3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = []; for ($i = 0; $i < 10000; $i++) { $a = [$i, $a]; } print_r($a, true);
Output for 5.4.0 - 5.5.14
Array ( [0] => 9999 [1] => Array ( [0] => 9998 [1] => Array ( [0] => 9997 [1] => Array ( [0] => 9996 [1] => Array ( [0] => 9995 [1] => Array ( [0] => 9994 [1] => Array ( [0] => 9993 [1] => Array ( [0] => 9992 [1] => Array ( [0] => 9991 [1] => Array ( [0] => 9990 [1] => Array ( [0] => 9989 [1] => Array ( [0] => 9988 [1] => Array ( [0] => 9987 [1] => Array ( [0] => 9986 [1] => Array ( [0] => 9985 [1] => Array ( [0] => 9984 [1] => Array ( [0] => 9983 [1] => Array ( [0] => 9982 [1] => Array ( [0] => 9981 [1] => Array ( [0] => 9980 [1] => Array ( [0] => 9979 [1] => Array ( [0] => 9978 [1] => Array ( [0] => 9977 [1] => Array ( [0] => 9976 [1] => Array ( [0] => 9975 [1] => Array ( [0] => 9974 [1] => Array ( [0] => 9973 [1] => Array ( [0] => 9972 [1] => Array ( [0] => 9971 [1] => Array ( [0] => 9970 [1] => Array ( [0] => 9969 [1] => Array ( [0] => 9968 [1] => Array ( [0] => 9967 [1] => Array ( [0] => 9966 [1] => Array ( [0] => 9965 [1] => Array ( [0] => 9964 [1] => Array ( [0] => 9963 [1] => Array ( [0] => 9962 [1] => Array ( [0] => 9961 [1] => Array ( [0] => 9960 [1] => Array ( [0] => 9959 [1] => Array ( [0] => 9958 [1] => Array ( [0] => 9957 [1] => Array ( [0] => 9956 [1] => Array ( [0] => 9955 [1] => Array ( [0] => 9954 [1] => Array ( [0] => 9953 [1] => Array ( [0] => 9952 [1] => Array ( [0] => 9951 [1] => Array ( [0] => 9950 [1] => Array ( [0] => 9949 [1] => Array
Process exited with code 137.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/qXMnj on line 2
Process exited with code 255.