3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php const Aa = 1; var_dump(Aa); var_dump(AA); var_dump(aa);
Output for 7.2.0 - 7.3.0rc3
int(1) Warning: Use of undefined constant AA - assumed 'AA' (this will throw an Error in a future version of PHP) in /in/c7HFo on line 6 string(2) "AA" Warning: Use of undefined constant aa - assumed 'aa' (this will throw an Error in a future version of PHP) in /in/c7HFo on line 7 string(2) "aa"
Output for 5.3.0 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.1.20
int(1) Notice: Use of undefined constant AA - assumed 'AA' in /in/c7HFo on line 6 string(2) "AA" Notice: Use of undefined constant aa - assumed 'aa' in /in/c7HFo on line 7 string(2) "aa"
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_CONST in /in/c7HFo on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_CONST in /in/c7HFo on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/c7HFo on line 3
Process exited with code 255.