3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = array(3, 7, 2); shuffle(array_merge(array(), $r)); var_dump($r);
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.2.0
Notice: Only variables should be passed by reference in /in/YsEsm on line 4 array(3) { [0]=> int(3) [1]=> int(7) [2]=> int(2) }
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
Strict Standards: Only variables should be passed by reference in /in/YsEsm on line 4 array(3) { [0]=> int(3) [1]=> int(7) [2]=> int(2) }
Output for 5.0.5
Fatal error: Only variables can be passed by reference in /in/YsEsm on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.4
array(3) { [0]=> int(3) [1]=> int(7) [2]=> int(2) }

preferences:
152.88 ms | 402 KiB | 216 Q