3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input = array("php", 4.0, array("green", "red")); $input2 = $input; // add ref count $ar = &$input2[0]; print_r($input2); $ar = 100; print_r($input2); $b = "bbbbbbb"; $ar = &b; print_r($input2); /* $reversed = array_reverse($input); $preserved = array_reverse($input, true); print_r($input); print_r($reversed); print_r($preserved); */
based on jBo8B
Output for 7.0.0
Parse error: syntax error, unexpected ';', expecting '[' in /in/4siAQ on line 10
Process exited with code 255.
Output for 5.5.24 - 5.6.16
Parse error: syntax error, unexpected ';', expecting '(' in /in/4siAQ on line 10
Process exited with code 255.
Output for 5.4.10 - 5.4.45
Parse error: syntax error, unexpected ';', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/4siAQ on line 10
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected ';', expecting T_PAAMAYIM_NEKUDOTAYIM in /in/4siAQ on line 10
Process exited with code 255.