3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php define ('X', 9); const xyt = [5,X]; var_dump(xyt);
based on BS0s6
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0rc3
array(2) { [0]=> int(5) [1]=> int(9) }
Output for hhvm-3.15.4
Warning: Constants may only evaluate to scalar values in /in/DNN8v on line 4 Notice: Use of undefined constant xyt - assumed 'xyt' in /in/DNN8v on line 6 string(3) "xyt"