Predefined Constants

These constants are defined by the PHP core. This includes PHP, the Zend engine, and SAPI modules.

EXAMPLE

PHP_VERSION (string)
The current PHP version as a string in “major.minor.release[extra]” notation.

PHP_MAJOR_VERSION (integer)
The current PHP “major” version as an integer (e.g., int(5) from version “5.2.7-extra”). Available since PHP 5.2.7.

PHP_MINOR_VERSION (integer)
The current PHP “minor” version as an integer (e.g., int(2) from version “5.2.7-extra”). Available since PHP 5.2.7.

Leave a Reply

Your email address will not be published. Required fields are marked *