3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('FOO', NULL); var_dump(constant('FOO::bar'));
Output for 4.3.2 - 5.2.3, 5.2.13 - 5.2.17, 5.3.3 - 7.1.0
Warning: constant(): Couldn't find constant FOO::bar in /in/Cg1ZV on line 5 NULL
Output for 5.2.4 - 5.2.12, 5.3.0 - 5.3.2
Fatal error: Class 'FOO' not found in /in/Cg1ZV on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: constant() [http://www.php.net/function.constant]: Couldn't find constant FOO::bar in /in/Cg1ZV on line 5 NULL