3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php define('TEST', ['one', 'two', 'three']); echo TEST[0];
based on 7IZ82
Output for 7.0.0 - 7.2.0
one
Output for 5.6.8 - 5.6.28
Warning: Constants may only evaluate to scalar values in /in/CpKrb on line 3 Notice: Use of undefined constant TEST - assumed 'TEST' in /in/CpKrb on line 5 T
Output for 5.4.10 - 5.5.35
Parse error: syntax error, unexpected '[', expecting ',' or ';' in /in/CpKrb on line 5
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/CpKrb on line 3
Process exited with code 255.