3v4l.org

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