3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var['foo'] = array('fooooo', 'bar'); $a = reset(array_slice($var['foo'], 0, 1)); var_dump($a); $a['foo'][0] = 'bar'; var_dump($a);

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.60.0030.01217.03
7.2.00.0060.00619.44
7.1.200.0100.00315.84
7.1.100.0030.00718.38
7.1.70.0000.00717.26
7.1.60.0120.00919.82
7.1.50.0000.02316.99
7.1.00.0000.08022.50
7.0.200.0000.00916.87
7.0.140.0070.06322.18
7.0.60.0100.08019.98
7.0.50.0030.08717.71
7.0.40.0070.04020.07
7.0.30.0230.04020.09
7.0.20.0200.08020.34
7.0.10.0070.05720.18
7.0.00.0030.05720.12
5.6.280.0030.07321.03
5.6.210.0130.06320.64
5.6.200.0070.03718.15
5.6.190.0000.04720.39
5.6.180.0100.08320.33
5.6.170.0270.04020.61
5.6.160.0100.08320.33
5.6.150.0070.05018.15
5.6.140.0070.07018.11
5.6.130.0100.08018.21
5.6.120.0130.08020.99
5.6.110.0130.07320.98
5.6.100.0100.07320.88
5.6.90.0030.07021.07
5.6.80.0100.06320.38
5.5.350.0070.07320.38
5.5.340.0170.06717.93
5.5.330.0130.07720.23
5.5.320.0300.07720.21
5.5.310.0270.06320.32
5.5.300.0170.06017.99
5.5.290.0030.08017.92
5.5.280.0170.05320.68
5.5.270.0100.08320.86
5.5.260.0130.06320.75
5.5.250.0030.04320.78
5.5.240.0000.07720.14
5.4.450.0570.05319.41
5.4.440.0800.06019.61
5.4.430.1000.04019.60
5.4.420.0970.06019.32
5.4.410.0170.04719.49
5.4.400.0030.05719.30
5.4.390.0630.06319.29
5.4.380.0170.05318.63
5.4.370.0100.05718.76
5.4.360.0100.05018.50
5.4.350.0110.03611.97
5.4.340.0050.04311.97
5.4.320.0060.03512.45
5.4.310.0050.03812.45
5.4.300.0050.04512.45
5.4.290.0080.03912.45
5.4.280.0080.03412.34
5.4.270.0080.04012.34
5.4.260.0100.07018.74
5.4.250.0000.05718.79
5.4.240.0130.04318.99
5.4.230.0170.05718.72
5.4.220.0100.05318.87
5.4.210.0130.04718.93
5.4.200.0030.05318.72
5.4.190.0030.05718.64
5.4.180.0100.05018.72
5.4.170.0070.06018.98
5.4.160.0030.05318.77
5.4.150.0130.04318.63
5.4.140.0000.05716.42
5.4.130.0030.05016.49
5.4.120.0070.04716.43
5.4.110.0130.05716.42
5.4.100.0100.04316.42
5.4.90.0100.04716.34
5.4.80.0000.05316.48
5.4.70.0100.04716.34
5.4.60.0100.04316.26
5.4.50.0130.06716.38
5.4.40.0170.04316.25
5.4.30.0100.06016.20
5.4.20.0030.06016.26
5.4.10.0130.05716.46
5.4.00.0030.06715.70
5.3.290.0070.04312.80
5.3.280.0070.05314.59
5.3.270.0070.05314.62
5.3.260.0070.05014.61
5.3.250.0070.07314.64
5.3.240.0170.06314.49
5.3.230.0130.04314.37
5.3.220.0030.05314.73
5.3.210.0100.04714.57
5.3.200.0030.05314.34
5.3.190.0100.05014.41
5.3.180.0100.04714.40
5.3.170.0070.05014.48
5.3.160.0070.05014.57
5.3.150.0030.05714.66
5.3.140.0100.05014.57
5.3.130.0100.06014.70
5.3.120.0100.05314.55
5.3.110.0170.05314.38
5.3.100.0030.05313.80
5.3.90.0170.06013.99
5.3.80.0070.05013.86
5.3.70.0070.05014.01
5.3.60.0100.05313.91
5.3.50.0030.05313.78
5.3.40.0030.05313.89
5.3.30.0070.04313.78
5.3.20.0000.05313.70
5.3.10.0070.04713.74
5.3.00.0100.04313.66
5.2.170.0100.03711.16
5.2.160.0070.03711.16
5.2.150.0070.04011.25
5.2.140.0030.04311.06
5.2.130.0070.03710.86
5.2.120.0130.03311.10
5.2.110.0100.03710.86
5.2.100.0070.03311.11
5.2.90.0030.04011.25
5.2.80.0100.04011.11
5.2.70.0100.04311.10
5.2.60.0030.04310.81
5.2.50.0030.04011.04
5.2.40.0070.03311.14
5.2.30.0070.06010.73
5.2.20.0030.04010.86
5.2.10.0070.05310.94
5.2.00.0030.04010.79
5.1.60.0100.0279.90
5.1.50.0070.0339.77
5.1.40.0070.0479.92
5.1.30.0030.04010.54
5.1.20.0030.04310.19
5.1.10.0030.03710.00
5.1.00.0030.03710.30
5.0.50.0030.0408.59
5.0.40.0000.0338.46
5.0.30.0000.0608.28
5.0.20.0030.0408.10
5.0.10.0030.0278.32
5.0.00.0030.0407.99
4.4.90.0030.0206.73
4.4.80.0030.0206.73
4.4.70.0000.0236.73
4.4.60.0070.0176.73
4.4.50.0130.0206.73
4.4.40.0000.0376.73
4.4.30.0070.0176.73
4.4.20.0070.0176.73
4.4.10.0000.0276.73
4.4.00.0000.0376.73
4.3.110.0070.0176.73
4.3.100.0030.0306.73
4.3.90.0000.0236.73
4.3.80.0030.0436.73
4.3.70.0030.0176.73
4.3.60.0000.0206.73
4.3.50.0070.0176.73
4.3.40.0130.0336.73
4.3.30.0000.0236.73
4.3.20.0030.0206.73
4.3.10.0000.0236.73
4.3.00.0000.0237.29