# Constants

> Section in “New and Extended Functionality” of the book [PHP 7 Explained](https://php7explained.com/) by Sebastian Bergmann and Stefan Priebsch, published by thePHP.cc. The book covers PHP 7.0 to 7.4 and was last updated in November 2020. HTML version: <https://php7explained.com/new-and-extended-functionality/constants/>

## In this section

- [New Global Constants](https://php7explained.com/new-and-extended-functionality/constants/new-global-constants/index.html.md): PHP 7 adds the global constants PHP_FLOAT_DIG, PHP_FLOAT_EPSILON, PHP_FLOAT_MIN, PHP_FLOAT_MAX, and PHP_INT_MIN, and PHP 7.2 introduces PHP_OS_FAMILY.
- [Arrays as Constant Values](https://php7explained.com/new-and-extended-functionality/constants/arrays-as-constant-values/index.html.md): How define() and const differ, and how PHP 7 completes array constants by letting define() create global constants with array values at runtime.
- [Class Constant Visibility](https://php7explained.com/new-and-extended-functionality/constants/class-constant-visibility/index.html.md): PHP 7.1 extends public, protected, and private visibility to class constants, so details such as bitmasks and magic numbers can be hidden.

---

Previous: [Trailing Commas in Function and Method calls](https://php7explained.com/new-and-extended-functionality/language-features/trailing-commas-in-function-and-method-calls/index.html.md) | Next: [New Global Constants](https://php7explained.com/new-and-extended-functionality/constants/new-global-constants/index.html.md)
