3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=[]; function addToArray($arr,$val) { array_push($arr,{"order_id"=>$var}); } addToArray($arr,"1234"); print_r($arr); ?>
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
Parse error: syntax error, unexpected '{' in /in/f9hvj on line 6
Process exited with code 255.

preferences:
168.18 ms | 1395 KiB | 36 Q