3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php define('X', array(new \stdClass));
based on 3rD5Z
Output for 7.0.0 - 7.2.0
Warning: Constants may only evaluate to scalar values or arrays in /in/b2Wm5 on line 4
Output for 5.3.0 - 5.6.28
Warning: Constants may only evaluate to scalar values in /in/b2Wm5 on line 4
Output for 4.3.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/b2Wm5 on line 4 Warning: Constants may only evaluate to scalar values in /in/b2Wm5 on line 4