3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php define( "xx", function() { return 1; } ); print(xx);
based on JdVvd
Output for 7.2.0
Warning: Constants may only evaluate to scalar values or arrays in /in/jaYLH on line 3 Warning: Use of undefined constant xx - assumed 'xx' (this will throw an Error in a future version of PHP) in /in/jaYLH on line 5 xx
Output for 7.0.0 - 7.1.10
Warning: Constants may only evaluate to scalar values or arrays in /in/jaYLH on line 3 Notice: Use of undefined constant xx - assumed 'xx' in /in/jaYLH on line 5 xx
Output for 5.3.19 - 5.6.28
Warning: Constants may only evaluate to scalar values in /in/jaYLH on line 3 Notice: Use of undefined constant xx - assumed 'xx' in /in/jaYLH on line 5 xx