3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php const X = array('a' => 'b'); var_dump(X['a']);
based on vXX7v
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
string(1) "b"
Output for hhvm-3.15.4
Warning: Constants may only evaluate to scalar values in /in/GVsMi on line 3 Notice: Use of undefined constant X - assumed 'X' in /in/GVsMi on line 4 string(1) "X"