3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getArray($temp) { return $temp; //return [1, 2, 3]; } function squareArray(array &$a) { foreach ($a as &$v) { $v *= 2; } } $temp = [1, 2, 3]; // Generates a warning in PHP 7. $tempA = getArray($temp); print_r(squareArray((getArray($temp))));

preferences:
51.99 ms | 402 KiB | 5 Q