3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 1 => 'string1', 2 => 'string2', 4 => 'string3', 5 => 'string4'); $arrays =$array; print_r($array); $array=array(); print_r(array_values($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.0100.01018.43
8.3.50.0110.00321.91
8.3.40.0070.00718.71
8.3.30.0030.01018.79
8.3.20.0040.00420.27
8.3.10.0050.00323.65
8.3.00.0050.00320.83
8.2.180.0070.01418.41
8.2.170.0110.00422.96
8.2.160.0070.00720.39
8.2.150.0000.00824.18
8.2.140.0060.01224.66
8.2.130.0110.00726.16
8.2.120.0040.00420.97
8.2.110.0030.00620.90
8.2.100.0110.00017.91
8.2.90.0030.00619.09
8.2.80.0040.00417.97
8.2.70.0080.00017.63
8.2.60.0090.00017.80
8.2.50.0050.00318.10
8.2.40.0050.00319.75
8.2.30.0030.00618.23
8.2.20.0040.00417.53
8.2.10.0040.00418.10
8.2.00.0080.00017.79
8.1.280.0170.00325.92
8.1.270.0150.00023.76
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00320.95
8.1.230.0070.00417.70
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0090.00017.22
8.1.190.0080.00017.23
8.1.180.0000.00718.10
8.1.170.0000.00918.56
8.1.160.0060.00321.98
8.1.150.0000.00718.44
8.1.140.0070.00017.22
8.1.130.0050.00317.81
8.1.120.0030.00317.43
8.1.110.0000.00817.36
8.1.100.0040.00417.29
8.1.90.0070.00017.38
8.1.80.0000.00717.33
8.1.70.0000.00717.37
8.1.60.0030.00617.43
8.1.50.0030.00617.46
8.1.40.0000.00717.45
8.1.30.0100.00017.46
8.1.20.0000.00817.51
8.1.10.0060.00317.31
8.1.00.0030.01017.41
8.0.300.0090.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.24
8.0.270.0030.00317.21
8.0.260.0050.00317.14
8.0.250.0000.00716.77
8.0.240.0040.00416.85
8.0.230.0080.00016.75
8.0.220.0070.00016.81
8.0.210.0030.00316.79
8.0.200.0000.00616.79
8.0.190.0040.00716.91
8.0.180.0090.00016.86
8.0.170.0050.00216.89
8.0.160.0040.00416.95
8.0.150.0030.00516.88
8.0.140.0000.00716.71
8.0.130.0050.00013.23
8.0.120.0040.00416.71
8.0.110.0050.00316.82
8.0.100.0080.00016.66
8.0.90.0000.00716.69
8.0.80.0070.00716.81
8.0.70.0000.00716.77
8.0.60.0000.00816.82
8.0.50.0040.00416.84
8.0.30.0080.01016.96
8.0.20.0080.01017.40
8.0.10.0070.00016.95
8.0.00.0040.01316.76
7.4.330.0050.00015.01
7.4.320.0000.00616.29
7.4.300.0000.00616.57
7.4.290.0000.00916.50
7.4.280.0080.00016.33
7.4.270.0030.00316.44
7.4.260.0000.00816.41
7.4.250.0000.00716.34
7.4.240.0020.00516.55
7.4.230.0000.00716.52
7.4.220.0140.00716.52
7.4.210.0120.00316.51
7.4.200.0030.00316.41
7.4.160.0070.00716.30
7.4.150.0150.00417.40
7.4.140.0150.00717.86
7.4.130.0090.01016.50
7.4.120.0100.00616.36
7.4.110.0110.00616.34
7.4.100.0130.00316.25
7.4.90.0070.01016.49
7.4.80.0120.00619.39
7.4.70.0130.00316.34
7.4.60.0030.01316.45
7.4.50.0000.00616.34
7.4.40.0060.01616.21
7.4.30.0110.00416.42
7.4.00.0040.00914.78
7.3.330.0030.00313.12
7.3.320.0000.00612.93
7.3.310.0000.00816.25
7.3.300.0000.00616.10
7.3.290.0110.00316.23
7.3.280.0070.01016.25
7.3.270.0090.00917.40
7.3.260.0120.00416.42
7.3.250.0100.01016.28
7.3.240.0060.01116.23
7.3.230.0080.00816.39
7.3.210.0160.00016.32
7.3.200.0080.00819.39
7.3.190.0120.00616.25
7.3.180.0100.01016.25
7.3.170.0080.00816.50
7.3.160.0090.00616.53
7.3.120.0050.01314.72
7.3.110.0140.00414.70
7.3.100.0070.00714.93
7.3.90.0040.01114.84
7.3.80.0160.00314.72
7.3.70.0070.01114.70
7.3.60.0060.01014.79
7.3.50.0100.00714.74
7.3.40.0080.00614.78
7.3.30.0030.01014.59
7.3.20.0070.00416.51
7.3.10.0060.00616.80
7.3.00.0090.00316.41
7.2.330.0060.01216.28
7.2.320.0110.00616.24
7.2.310.0110.00616.55
7.2.300.0100.01316.47
7.2.290.0040.01316.36
7.2.250.0030.01614.70
7.2.240.0030.01714.40
7.2.230.0040.01115.00
7.2.220.0030.01014.68
7.2.210.0060.01314.60
7.2.200.0030.01114.76
7.2.190.0030.01014.91
7.2.180.0000.01414.86
7.2.170.0100.00714.85
7.2.00.0000.01319.14
7.1.330.0000.01515.48
7.1.320.0040.01115.59
7.1.310.0030.01015.98
7.1.300.0100.00715.39
7.1.290.0040.01215.77
7.1.280.0060.00315.55
7.1.270.0030.00615.86
7.1.260.0060.00615.47
7.1.100.0000.01117.82
7.1.70.0000.00916.89
7.1.60.0110.01419.70
7.1.50.0170.01734.66
7.1.00.0000.08022.32
7.0.200.0260.00014.99
7.0.140.0030.07022.13
7.0.60.0070.04020.02
7.0.50.0030.04717.87
7.0.40.0030.09020.24
7.0.30.0370.07320.20
7.0.20.0300.07320.30
7.0.10.0070.09020.05
7.0.00.0200.04320.15
5.6.280.0000.07721.02
5.6.210.0130.07320.62
5.6.200.0100.08318.29
5.6.190.0100.08020.56
5.6.180.4170.04020.77
5.6.170.0270.04020.52
5.6.160.0100.06720.39
5.6.150.0070.03718.17
5.6.140.0070.03718.11
5.6.130.0130.05718.28
5.6.120.0030.04020.98
5.6.110.0070.08021.00
5.6.100.0070.06721.13
5.6.90.0030.04321.02
5.6.80.0130.07320.36
5.6.70.4570.03020.51
5.5.350.0100.08320.48
5.5.340.0100.05017.99
5.5.330.0130.05720.47
5.5.320.4030.04320.32
5.5.310.0300.05320.23
5.5.300.0070.04717.95
5.5.290.0070.04718.07
5.5.280.0030.08720.87
5.5.270.0070.08020.86
5.5.260.0230.06320.71
5.5.250.0070.08020.61
5.5.240.0400.06020.14
5.4.450.0430.03728.29
5.4.440.0230.04028.28
5.4.430.0430.04328.28
5.4.420.0370.03728.28
5.4.410.0700.04328.28
5.4.400.0630.03728.28
5.4.390.0230.04328.25
5.4.380.0170.05018.80
5.4.370.0170.05018.78
5.4.360.0170.05018.71
5.4.350.0230.04718.78
5.4.340.0130.05318.80
5.4.320.0100.03812.48
5.4.310.0080.04012.48
5.4.300.0050.03712.48
5.4.290.0050.04112.47
5.4.280.0040.03712.38
5.4.270.0060.03912.38
5.4.260.0080.03712.37
5.4.250.0090.03712.38
5.4.240.0030.04012.38
5.4.230.0080.03712.37
5.4.220.0070.03712.37
5.4.210.0090.03312.36
5.4.200.0080.04012.37
5.4.190.0080.03712.36
5.4.180.0070.03512.36
5.4.170.0060.03812.38
5.4.160.0090.03512.37
5.4.150.0050.03712.37
5.4.140.0060.03812.05
5.4.130.0100.03412.04
5.4.120.0120.03111.99
5.4.110.0080.04211.99
5.4.100.0060.03611.99
5.4.90.0070.03811.99
5.4.80.0050.04011.99
5.4.70.0090.03711.98
5.4.60.0050.03911.99
5.4.50.0060.03811.99
5.4.40.0090.03711.98
5.4.30.0110.03611.97
5.4.20.0080.03811.98
5.4.10.0080.03711.98
5.4.00.0060.04011.46
5.3.290.0090.03812.80
5.3.280.0070.04112.71
5.3.270.0040.04712.72
5.3.260.0080.04312.72
5.3.250.0100.03712.72
5.3.240.0090.04112.72
5.3.230.0090.04512.71
5.3.220.0040.04412.68
5.3.210.0070.04212.68
5.3.200.0080.03712.68
5.3.190.0080.03712.68
5.3.180.0090.05212.68
5.3.170.0090.03612.67
5.3.160.0100.03712.67
5.3.150.0100.03912.67
5.3.140.0070.03812.66
5.3.130.0080.04112.66
5.3.120.0080.04112.65
5.3.110.0080.04312.66
5.3.100.0090.04912.12
5.3.90.0100.04512.09
5.3.80.0110.04512.08
5.3.70.0150.04512.08
5.3.60.0120.05112.06
5.3.50.0080.04912.01
5.3.40.0060.04312.01
5.3.30.0050.04011.97
5.3.20.0050.03811.75
5.3.10.0070.03411.72
5.3.00.0070.03811.70
5.2.170.0090.0359.20
5.2.160.0060.0329.20
5.2.150.0070.0329.21
5.2.140.0080.0319.20
5.2.130.0060.0289.16
5.2.120.0090.0269.16
5.2.110.0030.0329.17
5.2.100.0030.0349.17
5.2.90.0050.0329.16
5.2.80.0030.0349.16
5.2.70.0060.0329.16
5.2.60.0080.0319.11
5.2.50.0070.0309.08
5.2.40.0050.0319.06
5.2.30.0050.0359.04
5.2.20.0030.0329.03
5.2.10.0040.0308.94
5.2.00.0060.0298.79
5.1.60.0030.0268.06
5.1.50.0060.0248.05
5.1.40.0020.0278.04
5.1.30.0040.0278.39
5.1.20.0060.0268.41
5.1.10.0040.0288.14
5.1.00.0020.0298.14
5.0.50.0020.0236.61
5.0.40.0020.0236.48
5.0.30.0050.0396.29
5.0.20.0060.0226.26
5.0.10.0030.0236.23
5.0.00.0030.0406.22
4.4.90.0070.0154.78
4.4.80.0030.0184.76
4.4.70.0020.0174.76
4.4.60.0000.0194.76
4.4.50.0050.0154.77
4.4.40.0100.0284.71
4.4.30.0050.0194.75
4.4.20.0080.0124.85
4.4.10.0030.0174.85
4.4.00.0020.0264.76
4.3.110.0030.0204.67
4.3.100.0020.0194.66
4.3.90.0040.0154.64
4.3.80.0040.0254.58
4.3.70.0040.0144.63
4.3.60.0040.0154.63
4.3.50.0050.0144.63
4.3.40.0040.0244.54
4.3.30.0000.0193.29
4.3.20.0000.0183.26
4.3.10.0040.0193.21
4.3.00.0100.01328.05

preferences:
44.2 ms | 401 KiB | 5 Q