3v4l.org

run code in 300+ PHP versions simultaneously
<?php // passing by value function computeValue( $param ){ // Something goes here foreach( $param as $k => $value){ $param[$k] = $value + 1; } return $param; } $x = array(); for( $i =0; $i<99; $i++){ $x[$i] = $i; } // array with 100 elements each incremented by 1 print_r(computeValue( $x)); ?>

preferences:
35.9 ms | 402 KiB | 5 Q