3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function a() { echo 'a'; } function b() { echo 'b'; } $condition = false; $f = ['a', 'b']; $f[$condition](); $f[!$condition](); $condition = true; $f = ['a', 'b']; $f[$condition](); $f[!$condition]();
Output for 5.4.12 - 7.2.6
abba
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/6bjg8 on line 13
Process exited with code 255.