3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=array("Volvo","XC90",array("BMW","Toyota")); $reverse=array_reverse($a); $preserve=array_reverse($a,true); unset($reverse.current()); print_r($a); print_r($reverse); print_r($preserve); ?>
Output for 7.0.0
Parse error: syntax error, unexpected '.', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/LBBYF on line 5
Process exited with code 255.
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Parse error: syntax error, unexpected '.', expecting ',' or ')' in /in/LBBYF on line 5
Process exited with code 255.

preferences:
154.97 ms | 1399 KiB | 24 Q