3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php const MY = [1, 2, 3]; var_dump(MY[1]);
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
int(2)
Output for hhvm-3.15.4
Warning: Constants may only evaluate to scalar values in /in/5Wv59 on line 3 Notice: Use of undefined constant MY - assumed 'MY' in /in/5Wv59 on line 5 string(1) "Y"