https://github.com/tomlutzenberger/constantine
The (hopefully) most comprehensive collection of constants for PHP
https://github.com/tomlutzenberger/constantine
collection constants php utility
Last synced: 11 months ago
JSON representation
The (hopefully) most comprehensive collection of constants for PHP
- Host: GitHub
- URL: https://github.com/tomlutzenberger/constantine
- Owner: tomlutzenberger
- License: mit
- Created: 2021-10-23T19:38:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-21T20:11:51.000Z (almost 4 years ago)
- Last Synced: 2025-01-10T08:57:09.379Z (over 1 year ago)
- Topics: collection, constants, php, utility
- Language: PHP
- Homepage:
- Size: 696 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README





\
[](https://sonarcloud.io/dashboard?id=tomlutzenberger_constantine)
[](https://sonarcloud.io/summary/new_code?id=tomlutzenberger_constantine)
[](https://sonarcloud.io/summary/new_code?id=tomlutzenberger_constantine)
[](https://sonarcloud.io/summary/new_code?id=tomlutzenberger_constantine)

CONSTANTINE
=====================
The (hopefully) most comprehensive collection of constants for PHP
Why should I use it?
--------------------
* Using magic numbers no one remembers the meaning of?\
**Code smell**
* Repeating yourself by using the same values over and over again?\
**Code smell**
* Having a typo in one of the repeated values?\
**Dangerous --> Bugs**
* Having to look up stuff?\
**Time-consuming**
* Updating values that changed all over the code base?\
**Time-consuming**
* Bloating your classes with constants and maintaining them?\
**Time-consuming**
What can I expect?
------------------
A growing amount of useful constants to use in your application. Right now CONSTANTINE contains **>13.9k** constants.
Requirements
------------
* PHP >=7.1
* nothing else, zero dependency
Installation
------------
The preferred way to install CONSTANTINE is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist tomlutzenberger/constantine "*"
```
or add
```
"tomlutzenberger/constantine": "*"
```
to the `required` section of your `composer.json` file.
Usage
-----
Simple and straight-forward:
```php