3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Enter your code here, enjoy! $ar = array("1","2","3","4","5","6"); $st = 2; $en = 4; function arrayRangeRand(&$arr, $s, $e){ $tmp = []; for($i=$s;$i<=$e;$i++){ $tmp[] = $arr[$i]; } shuffle($tmp); foreach($tmp as $ind=>$val){ $arr[$s+$ind] = $val; } } arrayRangeRand($ar, $st, $en); print_r($ar);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.4.00.0060.01114.87
7.3.120.0090.00914.75
7.3.110.0090.00914.66
7.3.100.0070.01014.62
7.3.90.0030.01214.62
7.3.80.0050.00914.79
7.3.70.0070.00514.78
7.3.60.0040.00914.64
7.3.50.0030.01014.88
7.3.40.0040.01114.79
7.3.30.0020.01414.49
7.3.20.0070.00915.76
7.3.10.0100.00515.77
7.3.00.0050.01015.60
7.2.250.0100.01014.99
7.2.240.0030.01114.92
7.2.230.0070.01314.83
7.2.220.0100.00814.93
7.2.210.0020.01314.97
7.2.200.0070.00814.93
7.2.190.0050.00714.81
7.2.180.0030.01115.04
7.2.170.0070.00815.12
7.2.160.0060.00315.20
7.2.150.0070.01016.66
7.2.140.0030.01016.93
7.2.130.0060.00617.05
7.2.120.0060.00916.89
7.2.110.0070.00716.93
7.2.100.0030.01017.02
7.2.90.0030.00916.92
7.2.80.0080.00417.00
7.2.70.0110.00316.78
7.2.60.0070.01016.63
7.2.50.0100.00717.11
7.2.40.0100.00317.05
7.2.30.0070.00317.14
7.2.20.0040.01117.01
7.2.10.0030.00917.04
7.2.00.0030.00917.07
7.1.330.0000.01314.09
7.1.320.0060.00613.70
7.1.310.0060.00613.68
7.1.300.0060.00613.48
7.1.290.0160.00313.89
7.1.280.0100.00613.81
7.1.270.0170.00013.95
7.1.260.0100.00313.73

preferences:
38.94 ms | 403 KiB | 5 Q