3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('a', 'b', 'c'); function nestArray($arr) { if(empty($arr)) { return array(); } return array($arr[0] => array_shift($arr)); } var_dump(nestArray($array));

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)
8.3.60.0080.00618.58
8.3.50.0110.00722.05
8.3.40.0070.00718.59
8.3.30.0120.00919.27
8.3.20.0090.00020.20
8.3.10.0040.00423.55
8.3.00.0000.01217.38
8.2.180.0140.00318.29
8.2.170.0110.00322.96
8.2.160.0090.00920.57
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0050.00319.36
8.2.110.0060.00322.25
8.2.100.0070.00417.91
8.2.90.0080.00017.75
8.2.80.0050.00318.64
8.2.70.0000.00817.50
8.2.60.0080.00017.63
8.2.50.0000.00817.63
8.2.40.0000.00917.63
8.2.30.0000.00917.76
8.2.20.0040.00417.78
8.2.10.0000.00718.04
8.2.00.0060.00317.60
8.1.280.0110.00425.92
8.1.270.0060.00323.91
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00423.96
8.1.230.0060.00619.52
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0040.00417.36
8.1.190.0030.00517.39
8.1.180.0030.00518.10
8.1.170.0040.00417.62
8.1.160.0070.00018.77
8.1.150.0000.00718.79
8.1.140.0000.00717.45
8.1.130.0000.00717.74
8.1.120.0000.00717.40
8.1.110.0090.00017.43
8.1.100.0040.00417.27
8.1.90.0040.00417.34
8.1.80.0050.00317.36
8.1.70.0000.00717.33
8.1.60.0030.00617.59
8.1.50.0000.00917.41
8.1.40.0030.00517.49
8.1.30.0000.00917.59
8.1.20.0080.00017.48
8.1.10.0000.00817.63
8.1.00.0000.00717.48
8.0.300.0000.00718.77
8.0.290.0050.00316.75
8.0.280.0030.00317.87
8.0.270.0030.00317.98
8.0.260.0040.00417.26
8.0.250.0000.00616.86
8.0.240.0000.00616.85
8.0.230.0070.00016.87
8.0.220.0030.00316.83
8.0.210.0030.00316.80
8.0.200.0000.00716.88
8.0.190.0040.00416.76
8.0.180.0040.00416.91
8.0.170.0000.00816.86
8.0.160.0040.00416.88
8.0.150.0070.00316.66
8.0.140.0000.00716.84
8.0.130.0000.00713.25
8.0.120.0040.00416.78
8.0.110.0070.00016.88
8.0.100.0030.00316.72
8.0.90.0070.00016.84
8.0.80.0060.01216.73
8.0.70.0040.00416.88
8.0.60.0070.00016.89
8.0.50.0030.00616.84
8.0.30.0120.00917.17
8.0.20.0090.00917.40
8.0.10.0000.00716.82
8.0.00.0090.01416.53
7.4.330.0020.00215.00
7.4.320.0000.00716.31
7.4.300.0000.00616.50
7.4.290.0030.00516.41
7.4.280.0070.00016.51
7.4.270.0040.00416.65
7.4.260.0070.00016.56
7.4.250.0000.00716.45
7.4.240.0030.00416.51
7.4.230.0040.00416.32
7.4.220.0080.01116.45
7.4.210.0070.00816.46
7.4.200.0070.00016.68
7.4.160.0120.00316.64
7.4.150.0120.01217.40
7.4.140.0130.00717.86
7.4.130.0060.01016.34
7.4.120.0060.01316.35
7.4.110.0110.00716.38
7.4.100.0090.00816.69
7.4.90.0060.01116.41
7.4.80.0070.01419.39
7.4.70.0140.00316.24
7.4.60.0110.00716.41
7.4.50.0070.00016.33
7.4.40.0100.00716.62
7.4.30.0140.00316.73
7.4.00.0030.01314.75
7.3.330.0000.00513.17
7.3.320.0070.00013.27
7.3.310.0040.00416.38
7.3.300.0000.00716.31
7.3.290.0070.00716.25
7.3.280.0070.01116.26
7.3.270.0150.00417.40
7.3.260.0100.00716.50
7.3.250.0020.01516.32
7.3.240.0120.00816.67
7.3.230.0100.00716.44
7.3.210.0100.00716.46
7.3.200.0140.00416.25
7.3.190.0110.00516.41
7.3.180.0120.00316.51
7.3.170.0110.00816.61
7.3.160.0030.01316.55
7.3.120.0030.01214.95
7.3.110.0040.01114.86
7.3.100.0030.01014.45
7.3.90.0060.00914.85
7.3.80.0000.01314.55
7.3.70.0060.00914.57
7.3.60.0120.00314.80
7.3.50.0100.00314.51
7.3.40.0040.01114.70
7.3.30.0030.01014.84
7.3.20.0110.00016.74
7.3.10.0060.00616.41
7.3.00.0090.00616.61
7.2.330.0070.01016.41
7.2.320.0060.00916.54
7.2.310.0130.00316.43
7.2.300.0060.00916.46
7.2.290.0070.01416.48
7.2.240.0040.00814.73
7.2.230.0080.00815.08
7.2.220.0090.00614.97
7.2.210.0080.00314.85
7.2.200.0040.01115.01
7.2.190.0090.00614.66
7.2.180.0070.01114.77
7.2.170.0110.00414.77
7.2.160.0060.00915.11
7.2.150.0060.00616.48
7.2.140.0040.00716.88
7.2.130.0050.00516.90
7.2.120.0060.00616.80
7.2.110.0000.01016.81
7.2.100.0110.00317.04
7.2.90.0000.01216.67
7.2.80.0030.00917.08
7.2.70.0090.00316.97
7.2.60.0010.01216.84
7.2.50.0000.01616.81
7.2.40.0000.01216.93
7.2.30.0080.00316.89
7.2.20.0050.00516.92
7.2.10.0060.00616.93
7.2.00.0080.00817.05
7.1.330.0040.01115.61
7.1.320.0110.00315.95
7.1.310.0070.00315.64
7.1.300.0030.01015.59
7.1.290.0110.00315.64
7.1.280.0000.01215.56
7.1.270.0030.01315.85
7.1.260.0100.00315.63
7.1.250.0030.00915.62
7.1.200.0060.00615.74
7.1.70.0080.00017.27
7.1.60.0060.01919.32
7.1.50.0090.01216.68
7.1.00.0030.07722.45
7.0.200.0060.00316.88
7.0.140.0070.07322.12
7.0.60.0130.06320.04
7.0.50.0030.04017.88
7.0.40.0000.04720.14
7.0.30.0270.03720.06
7.0.20.0370.07720.07
7.0.10.0100.08720.19
7.0.00.0030.04320.21
5.6.280.0070.07021.16
5.6.210.0070.06720.65
5.6.200.0070.08018.16
5.6.190.0100.08020.68
5.6.180.0570.07320.46
5.6.170.0270.04720.48
5.6.160.0000.06020.55
5.6.150.0070.06018.16
5.6.140.0070.06718.16
5.6.130.0030.08318.20
5.6.120.0070.07021.13
5.6.110.0170.07720.97
5.6.100.0030.05020.98
5.6.90.0000.05021.18
5.6.80.0200.06720.37
5.5.350.0000.07020.50
5.5.340.0070.08018.08
5.5.330.0070.08320.21
5.5.320.0070.08320.34
5.5.310.0300.07720.41
5.5.300.0000.04317.95
5.5.290.0030.09017.98
5.5.280.0030.05320.88
5.5.270.0100.07720.72
5.5.260.0070.08020.87
5.5.250.0100.07720.46
5.5.240.0030.08320.29
5.4.450.0200.05319.38
5.4.440.0130.06019.46
5.4.430.0130.06319.47
5.4.420.0670.00019.51
5.4.410.0670.00019.25
5.4.400.0630.00019.23
5.4.390.0630.00019.12
5.4.380.0630.00018.98
5.4.370.0630.00019.11
5.4.360.0630.00019.04
5.4.350.0670.00019.11
5.4.340.0080.03812.02
5.4.320.0070.03412.51
5.4.310.0070.04012.50
5.4.300.0080.03512.50
5.4.290.0050.04212.50
5.4.280.0090.03812.39
5.4.270.0060.03912.40
5.4.260.0090.03412.40
5.4.250.0030.04012.40
5.4.240.0050.03612.39
5.4.230.0080.04312.39
5.4.220.0050.03712.39
5.4.210.0090.03412.39
5.4.200.0080.03412.39
5.4.190.0070.03412.39
5.4.180.0070.03512.38
5.4.170.0070.03912.39
5.4.160.0060.03512.39
5.4.150.0060.03512.38
5.4.140.0060.03612.07
5.4.130.0050.03712.06
5.4.120.0040.03712.02
5.4.110.0080.03612.02
5.4.100.0060.03512.01
5.4.90.0090.03312.02
5.4.80.0090.03312.01
5.4.70.0080.03312.01
5.4.60.0060.03512.01
5.4.50.0030.03712.01
5.4.40.0040.03612.00
5.4.30.0060.04211.99
5.4.20.0070.03812.00
5.4.10.0080.03712.00
5.4.00.0060.03611.48
5.3.290.0070.03812.80
5.3.280.0020.04412.71
5.3.270.0050.04012.73
5.3.260.0050.04512.72
5.3.250.0070.04612.72
5.3.240.0050.03812.72
5.3.230.0080.03712.71
5.3.220.0080.03612.68
5.3.210.0100.03612.68
5.3.200.0050.03712.68
5.3.190.0040.03912.68
5.3.180.0070.03512.67
5.3.170.0050.03712.67
5.3.160.0070.03512.68
5.3.150.0060.04212.68
5.3.140.0090.03312.66
5.3.130.0030.04112.66
5.3.120.0060.03812.66
5.3.110.0080.03612.66
5.3.100.0080.03612.12
5.3.90.0040.03812.10
5.3.80.0100.04112.09
5.3.70.0070.04112.09
5.3.60.0090.03512.07
5.3.50.0060.04012.02
5.3.40.0070.03712.02
5.3.30.0080.03911.98
5.3.20.0060.03511.77
5.3.10.0060.03411.72
5.3.00.0080.04311.72
5.2.170.0080.0399.21
5.2.160.0050.0319.22
5.2.150.0040.0369.21
5.2.140.0040.0449.21
5.2.130.0040.0369.17
5.2.120.0040.0349.17
5.2.110.0070.0289.18
5.2.100.0060.0309.18
5.2.90.0070.0269.18
5.2.80.0030.0359.17
5.2.70.0100.0259.17
5.2.60.0080.0309.12
5.2.50.0070.0379.09
5.2.40.0060.0399.07
5.2.30.0040.0359.05
5.2.20.0060.0309.03
5.2.10.0070.0288.95
5.2.00.0040.0338.80
5.1.60.0100.0208.09
5.1.50.0110.0238.09
5.1.40.0060.0258.06
5.1.30.0040.0278.41
5.1.20.0070.0258.43
5.1.10.0020.0288.16
5.1.00.0060.0248.16
5.0.50.0050.0196.63
5.0.40.0020.0206.50
5.0.30.0090.0346.31
5.0.20.0020.0206.28
5.0.10.0020.0206.25
5.0.00.0040.0296.25
4.4.90.0030.0264.78
4.4.80.0040.0254.75
4.4.70.0050.0134.75
4.4.60.0030.0154.76
4.4.50.0010.0174.77
4.4.40.0040.0254.71
4.4.30.0020.0174.76
4.4.20.0030.0174.84
4.4.10.0040.0174.85
4.4.00.0020.0264.75
4.3.110.0020.0234.67
4.3.100.0040.0134.67
4.3.90.0020.0214.63
4.3.80.0030.0264.58
4.3.70.0010.0184.63
4.3.60.0040.0204.63
4.3.50.0040.0164.63
4.3.40.0030.0284.53
4.3.30.0020.0183.30
4.3.20.0030.0183.28
4.3.10.0020.0153.24
4.3.00.0030.0207.14

preferences:
37.5 ms | 400 KiB | 5 Q