3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sum($arr) { if ( empty($arr) ) { return; } return $arr[0] + sum(array_slice($arr, 1)); } echo sum(array(1,2,3,4,5))

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)
5.4.260.0130.06319.00
5.4.250.0100.06018.99
5.4.240.0070.05318.97
5.4.230.0130.04718.80
5.4.220.0130.07018.77
5.4.210.0100.05019.00
5.4.200.0100.06018.97
5.4.190.0130.04718.94
5.4.180.0030.06018.75
5.4.170.0170.04318.64
5.4.160.0070.05019.07
5.4.150.0070.05718.98
5.4.140.0100.07316.43
5.4.130.0100.05016.54
5.4.120.0100.07016.54
5.4.110.0070.05016.52
5.4.100.0070.06716.41
5.4.90.0130.06316.62
5.4.80.0130.04316.55
5.4.70.0130.06716.61
5.4.60.0130.07016.58
5.4.50.0130.07016.47
5.4.40.0100.05016.58
5.4.30.0070.06316.48
5.4.20.0170.05716.46
5.4.10.0170.06016.49
5.4.00.0070.05315.82
5.3.280.0070.06014.68
5.3.270.0070.07314.58
5.3.260.0130.04714.67
5.3.250.0070.05314.59
5.3.240.0200.06014.77
5.3.230.0030.07714.58
5.3.220.0170.06714.58
5.3.210.0030.06014.64
5.3.200.0100.06714.79
5.3.190.0200.06014.74
5.3.180.0170.04714.74
5.3.170.0070.07314.56
5.3.160.0000.05714.39
5.3.150.0130.04314.64
5.3.140.0130.05714.62
5.3.130.0030.06014.68
5.3.120.0130.04714.60
5.3.110.0070.07314.57
5.3.100.0070.05314.20
5.3.90.0030.06014.10
5.3.80.0130.05714.09
5.3.70.0070.06714.09
5.3.60.0000.06314.18
5.3.50.0100.06713.85
5.3.40.0070.05714.17
5.3.30.0130.07313.92
5.3.20.0030.06313.78
5.3.10.0170.04713.63
5.3.00.0100.07013.55
5.2.170.0070.04711.22
5.2.160.0130.04710.97
5.2.150.0030.06011.23
5.2.140.0070.04011.24
5.2.130.0130.04711.18
5.2.120.0030.06011.17
5.2.110.0030.05711.20
5.2.100.0100.04311.17
5.2.90.0070.04311.18
5.2.80.0200.03311.27
5.2.70.0130.04311.31
5.2.60.0000.04311.23
5.2.50.0070.04311.20
5.2.40.0100.03711.09
5.2.30.0100.05011.19
5.2.20.0030.04010.93
5.2.10.0130.04310.93
5.2.00.0000.04710.54
5.1.60.0070.03710.24
5.1.50.0000.0379.96
5.1.40.0030.05010.21
5.1.30.0070.03710.30
5.1.20.0030.04310.42
5.1.10.0100.03710.13
5.1.00.0070.04010.07
5.0.50.0030.0408.59
5.0.40.0070.0238.51
5.0.30.0100.0478.31
5.0.20.0070.0308.18
5.0.10.0000.0338.21
5.0.00.0000.0508.16
4.4.90.0030.0305.84
4.4.80.0000.0235.88
4.4.70.0070.0275.85
4.4.60.0030.0305.96
4.4.50.0000.0235.87
4.4.40.0030.0405.80
4.4.30.0000.0235.85
4.4.20.0030.0205.89
4.4.10.0000.0235.82
4.4.00.0030.0335.85
4.3.110.0000.0235.79
4.3.100.0100.0235.79
4.3.90.0000.0305.74
4.3.80.0170.0275.68
4.3.70.0030.0235.72
4.3.60.0070.0175.76
4.3.50.0100.0135.82
4.3.40.0130.0305.71
4.3.30.0030.0275.68
4.3.20.0000.0235.68
4.3.10.0000.0235.68
4.3.00.0170.0177.29

preferences:
132.59 ms | 1398 KiB | 7 Q