3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace foo; define("TRUE", "bar"); var_dump (TRUE); var_dump (\TRUE); var_dump (foo\TRUE);
based on Zgqej
Output for 7.0.0 - 7.2.0
bool(true) bool(true) Fatal error: Uncaught Error: Undefined constant 'foo\foo\TRUE' in /in/eFBsN:8 Stack trace: #0 {main} thrown in /in/eFBsN on line 8
Process exited with code 255.
Output for 5.3.21 - 5.6.28
string(3) "bar" bool(true) Fatal error: Undefined constant 'foo\foo\TRUE' in /in/eFBsN on line 8
Process exited with code 255.