PHPackages                             repat/port-constants - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. repat/port-constants

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

repat/port-constants
====================

A series of constants for working with standardized network ports

0.1.3(6y ago)11.7k[1 PRs](https://github.com/repat/port-constants/pulls)MITPHPCI failing

Since Nov 6Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/repat/port-constants)[ Packagist](https://packagist.org/packages/repat/port-constants)[ RSS](/packages/repat-port-constants/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (1)Versions (6)Used By (0)

Port Constants
==============

[](#port-constants)

[![Build Status](https://camo.githubusercontent.com/9a3fb6c83a980f96e9d40f3267b76e124d0efb1cc6fb2fc3b1daf4796385101e/68747470733a2f2f7472617669732d63692e6f72672f72657061742f706f72742d636f6e7374616e74732e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/repat/port-constants)[![Packagist](https://camo.githubusercontent.com/71d6bf7334f4459ab3a24fe19e1322f762a0d49fb23ccb2e9ecdd05b4d5a790c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72657061742f706f72742d636f6e7374616e74732e737667)](https://packagist.org/packages/repat/port-constants)

The **Port Constants** package defines a number of useful PHP constants within your application, making it easier to express network port numbers. Pull Requests are welcome!

Shoutout to the [`stevegrunwell/time-constants`](https://github.com/stevegrunwell/time-constants) package for the idea. I also wrote a [`repat/date-constants`](https://github.com/repat/date-constants) package and [`repat/http-constants`](https://github.com/repat/http-constants).

Installation
------------

[](#installation)

Port Constants is intended to be installed via Composer:

```
$ composer require repat/port-constants
```

The package has been configured to automatically expose the `constants.php` file via the Composer-generated autoloader, so you'll be ready to use the constants as soon as the package has been installed!

Defined constants
-----------------

[](#defined-constants)

This is a list of all constants defined by this package, along with their values. Each constant is wrapped in a `if (! defined(...))` conditional, ensuring these constants can easily be redefined if necessary and won't conflict with existing constants.

ServicePortConstFTP Data20`PORT_FTP_DATA`FTP Control21`PORT_FTP_CTRL`SSH22`PORT_SSH`Telnet23`PORT_TELNET`SMTP25`PORT_SMTP`DNS53`PORT_DNS`DHCP Server67`PORT_DHCP_SERVER`DHCP Client68`PORT_DHCP_CLIENT`Gopher70`PORT_GOPHER`HTTP80`PORT_HTTP`POP3110`PORT_POP3`IMAP143`PORT_IMAP`SNMP161`PORT_SNMP`SNMP TRAP162`PORT_SNMP_TRAP`IRC194`PORT_IRC`LDAP389`PORT_LDAP`HTTPS443`PORT_HTTPS`HTTPS443`PORT_SSL`SMTPS465`PORT_SMTPS`RSH514`PORT_RSH`DHCP IPv6 Client546`PORT_DHCP6_CLIENT`DHCP IPv6 Server547`PORT_DHCP6_SERVER`SMTP MSA587`PORT_SMTP_MSA`LDAPS636`PORT_LDAPS`Doom666`PORT_DOOM`FTPS Data989`PORT_FTPS_DATA`FTPS Control990`PORT_FTPS_CTRL`IMAPS993`PORT_IMAPS`POP3S995`PORT_POP3S`OpenVPN1194`PORT_OPENVPN`MySQL/MariaDB3306`PORT_MYSQL`SIP5060`PORT_SIP`SIPS5061`PORT_SIPS`XMPP C2S5222`PORT_XMPP_C2S`XMPP Legacy SSL5223`PORT_XMPP_LEGACY_SSL`XMPP S2S5269`PORT_XMPP_S2S`PostgreSQL5432`PORT_POSTGRES`CouchDB5984`PORT_COUCHDB`Redis6379`PORT_REDIS`IRC Alternative6667`PORT_IRC_ALT`BitTorrent Tracker6969`PORT_BITTORRENT_TRACKER`BitTorrent Start Range6881`PORT_BITTORRENT_START`BitTorrent End Range6889`PORT_BITTORRENT_END`Memcached11211`PORT_MEMCACHED`MongoDB27017`PORT_MONGODB`TODO
----

[](#todo)

- Finish Tests

Version
-------

[](#version)

- Version 0.1.3

Contact
-------

[](#contact)

#### repat

[](#repat)

- Homepage:
- e-mail:
- Twitter: [@repat123](https://twitter.com/repat123 "repat123 on twitter")

[![Flattr this git repo](https://camo.githubusercontent.com/7e3f46a36526479d701ef7f90a0f8c3ac2fbab3087446e2a9fceed75cd1ab802/687474703a2f2f6170692e666c617474722e636f6d2f627574746f6e2f666c617474722d62616467652d6c617267652e706e67)](https://flattr.com/submit/auto?user_id=repat&url=https://github.com/repat/date-constants&title=date-constants&language=&tags=github&category=software)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance46

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

2478d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/405dab243007488e7e7851422e5864a9312aee36058d60f1e6d623232c4d3131?d=identicon)[repat](/maintainers/repat)

---

Top Contributors

[![repat](https://avatars.githubusercontent.com/u/516807?v=4)](https://github.com/repat "repat (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/repat-port-constants/health.svg)

```
[![Health](https://phpackages.com/badges/repat-port-constants/health.svg)](https://phpackages.com/packages/repat-port-constants)
```

###  Alternatives

[rtablada/package-installer

An easy to use package installer for Laravel 4

12868.9k](/packages/rtablada-package-installer)[codedheartinside/apriori

Apriori data analysing algorithm written within PHP.

1222.7k](/packages/codedheartinside-apriori)[moosend/website-tracking

By installing the Moosend PHP Tracking library you are can track page views, product views, add to cart events and successful purchases. You can later use these details to segment your user base, run automations, check how successful your latest promo has been and how many conversions your landing page has led to.

1022.1k1](/packages/moosend-website-tracking)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
