3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['banana','apple','corn',['pear','coconut']]; echo'<pre>'; print_r(array_map(array_fill_keys($array,[],$array)); print_r(array_fill_keys($array,[]));
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected ';' in /in/Ol5t3 on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/Ol5t3 on line 2
Process exited with code 255.

preferences:
179.99 ms | 1395 KiB | 62 Q