3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1, 2); $count = count($array); for ($i = 0; $i < $count; $i++) { echo "\nChecking $i: \n"; echo "Bad: " . $array['$i'] . "\n"; echo "Good: " . $array[$i] . "\n"; echo "Bad: {$array['$i']}\n"; echo "Good: {$array[$i]}\n"; }

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.0150.00018.43
8.3.50.0120.01021.98
8.3.40.0040.01118.79
8.3.30.0040.01119.01
8.3.20.0000.00820.27
8.3.10.0080.00020.63
8.3.00.0080.00019.50
8.2.180.0090.00618.54
8.2.170.0070.01022.96
8.2.160.0100.00720.35
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00022.24
8.2.110.0030.00620.45
8.2.100.0090.00318.09
8.2.90.0040.00419.17
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0040.00418.03
8.2.50.0080.00018.07
8.2.40.0000.00818.16
8.2.30.0000.00718.11
8.2.20.0040.00417.80
8.2.10.0040.00418.11
8.2.00.0030.00517.83
8.1.280.0180.00625.92
8.1.270.0030.00522.24
8.1.260.0040.00426.35
8.1.250.0050.00928.09
8.1.240.0030.00623.70
8.1.230.0030.00719.22
8.1.220.0050.00217.74
8.1.210.0040.00418.77
8.1.200.0040.00417.23
8.1.190.0050.00317.23
8.1.180.0000.00818.10
8.1.170.0000.00818.56
8.1.160.0000.00722.05
8.1.150.0040.00418.73
8.1.140.0050.00317.44
8.1.130.0030.00317.82
8.1.120.0000.00717.50
8.1.110.0040.00417.45
8.1.100.0040.00417.33
8.1.90.0070.00017.36
8.1.80.0070.00017.46
8.1.70.0020.00517.38
8.1.60.0000.01017.60
8.1.50.0040.00417.42
8.1.40.0050.00317.38
8.1.30.0060.00317.58
8.1.20.0040.00417.65
8.1.10.0030.00517.52
8.1.00.0000.00817.48
8.0.300.0040.00418.77
8.0.290.0030.00516.88
8.0.280.0030.00318.43
8.0.270.0040.00417.21
8.0.260.0000.00617.18
8.0.250.0000.00617.04
8.0.240.0070.00016.92
8.0.230.0000.00717.01
8.0.220.0000.00716.93
8.0.210.0000.00616.95
8.0.200.0030.00317.08
8.0.190.0040.00416.97
8.0.180.0040.00416.98
8.0.170.0080.00016.99
8.0.160.0030.00516.90
8.0.150.0040.00416.93
8.0.140.0070.00016.87
8.0.130.0050.00013.33
8.0.120.0000.00916.90
8.0.110.0080.00016.97
8.0.100.0000.00716.93
8.0.90.0040.00416.83
8.0.80.0120.01016.90
8.0.70.0040.00416.74
8.0.60.0040.00416.82
8.0.50.0000.00816.91
8.0.30.0100.01117.15
8.0.20.0120.00717.40
8.0.10.0040.00417.11
8.0.00.0080.01016.70
7.4.330.0030.00315.14
7.4.320.0000.00616.48
7.4.300.0030.00316.50
7.4.290.0000.00616.41
7.4.280.0070.00016.41
7.4.270.0040.00416.54
7.4.260.0040.00416.59
7.4.250.0070.00016.48
7.4.240.0020.00616.49
7.4.230.0000.00716.33
7.4.220.0100.00716.53
7.4.210.0110.00416.66
7.4.200.0070.00016.33
7.4.160.0150.00016.83
7.4.150.0150.00317.40
7.4.140.0100.01117.86
7.4.130.0100.01016.44
7.4.120.0100.01116.66
7.4.110.0060.01116.61
7.4.100.0090.00916.66
7.4.90.0150.00316.52
7.4.80.0100.00719.39
7.4.70.0070.01416.58
7.4.60.0060.00916.48
7.4.50.0040.00416.61
7.4.40.0130.00616.31
7.4.30.0030.01316.33
7.4.00.0030.01215.14
7.3.330.0030.00413.37
7.3.320.0030.00313.24
7.3.310.0030.00316.45
7.3.300.0030.00316.29
7.3.290.0090.00616.37
7.3.280.0100.00916.37
7.3.270.0110.00717.40
7.3.260.0150.00416.41
7.3.250.0070.01016.47
7.3.240.0030.01316.55
7.3.230.0100.00716.50
7.3.210.0000.02116.42
7.3.200.0150.00319.39
7.3.190.0090.01316.59
7.3.180.0160.00016.49
7.3.170.0120.00516.43
7.3.160.0090.00916.48
7.2.330.0060.01216.87
7.2.320.0070.01016.71
7.2.310.0060.01116.69
7.2.300.0070.01016.42
7.2.290.0040.01216.63
7.2.60.0000.01316.84
7.2.00.0120.00419.46
7.1.200.0030.00615.81
7.1.100.0070.00717.80
7.1.70.0040.00417.20
7.1.60.0110.01119.32
7.1.50.0140.00716.90
7.1.00.0070.07022.33
7.0.200.0040.00416.79
7.0.140.0070.07021.96
7.0.60.0100.07019.82
7.0.50.0070.04017.73
7.0.40.0070.08320.08
7.0.30.0230.07720.17
7.0.20.0200.04020.30
7.0.10.0200.04720.02
7.0.00.0100.08020.04
5.6.280.0030.07320.89
5.6.210.0000.09020.75
5.6.200.0070.08718.09
5.6.190.0030.09020.41
5.6.180.0070.08720.57
5.6.170.0300.08020.62
5.6.160.0100.04020.48
5.6.150.0170.03318.14
5.6.140.0030.05718.13
5.6.130.0070.04718.18
5.6.120.0000.05721.11
5.6.110.0100.08320.93
5.6.100.0130.07020.98
5.6.90.0030.04020.87
5.6.80.0100.07720.46
5.6.70.3770.03720.47
5.5.350.0130.08020.41
5.5.340.0200.06318.00
5.5.330.0100.06020.40
5.5.320.0430.07720.41
5.5.310.0170.05020.26
5.5.300.0130.07718.02
5.5.290.0030.04717.91
5.5.280.0030.05020.79
5.5.270.0170.07320.79
5.5.260.0000.05720.86
5.5.250.0070.04720.57
5.5.240.0100.07320.15
5.4.450.0100.03319.38
5.4.440.1200.06319.46
5.4.430.1230.10719.46
5.4.420.0700.00019.14
5.4.410.0630.00019.19
5.4.400.0630.00019.33
5.4.390.0630.00019.05
5.4.380.0630.00019.07
5.4.370.0600.00018.97
5.4.360.0630.00019.09
5.4.350.0670.00019.08
5.4.340.0630.00019.00
5.4.320.0050.03612.45
5.4.310.0050.03712.45
5.4.300.0060.03612.46
5.4.290.0050.03812.45
5.4.280.0060.04212.35
5.4.270.0020.04212.35
5.4.260.0080.03612.35
5.4.250.0050.03912.35
5.4.240.0100.03412.35
5.4.230.0060.03712.34
5.4.220.0050.03612.34
5.4.210.0060.03412.34
5.4.200.0060.03712.34
5.4.190.0040.03712.34
5.4.180.0080.03312.34
5.4.170.0030.03812.35
5.4.160.0040.03712.35
5.4.150.0070.03412.34
5.4.140.0070.03512.03
5.4.130.0080.03312.02
5.4.120.0040.03711.97
5.4.110.0060.03711.97
5.4.100.0030.03711.96
5.4.90.0050.03711.96
5.4.80.0080.03311.96
5.4.70.0070.03411.96
5.4.60.0040.03611.96
5.4.50.0050.03511.97
5.4.40.0070.03311.95
5.4.30.0060.03411.95
5.4.20.0060.03311.95
5.4.10.0060.03811.95
5.4.00.0060.03511.44
5.3.290.0050.04012.80
5.3.280.0030.04012.71
5.3.270.0070.03812.72
5.3.260.0060.04012.72
5.3.250.0050.03812.72
5.3.240.0060.03712.72
5.3.230.0050.03712.71
5.3.220.0060.03612.68
5.3.210.0050.03812.68
5.3.200.0040.03812.68
5.3.190.0050.03812.68
5.3.180.0070.04112.67
5.3.170.0090.04112.66
5.3.160.0050.03712.67
5.3.150.0050.03812.67
5.3.140.0040.03912.66
5.3.130.0040.04012.66
5.3.120.0050.04012.65
5.3.110.0050.03912.66
5.3.100.0070.04012.12
5.3.90.0040.03812.09
5.3.80.0060.03512.08
5.3.70.0070.03512.07
5.3.60.0070.03412.07
5.3.50.0030.03912.00
5.3.40.0090.03312.00
5.3.30.0050.03511.94
5.3.20.0070.03811.72
5.3.10.0050.03511.69
5.3.00.0070.03411.68
5.2.170.0040.0309.18
5.2.160.0060.0279.18
5.2.150.0040.0369.18
5.2.140.0050.0319.17
5.2.130.0070.0279.13
5.2.120.0050.0289.13
5.2.110.0030.0309.14
5.2.100.0050.0289.14
5.2.90.0020.0329.14
5.2.80.0060.0339.14
5.2.70.0010.0339.14
5.2.60.0030.0329.09
5.2.50.0030.0319.06
5.2.40.0020.0309.03
5.2.30.0060.0279.01
5.2.20.0060.0279.00
5.2.10.0050.0278.93
5.2.00.0040.0298.79
5.1.60.0050.0228.08
5.1.50.0050.0328.07
5.1.40.0070.0278.05
5.1.30.0030.0278.41
5.1.20.0050.0268.43
5.1.10.0030.0278.16
5.1.00.0030.0278.16
5.0.50.0050.0196.63
5.0.40.0020.0206.49
5.0.30.0030.0316.30
5.0.20.0060.0166.27
5.0.10.0020.0216.25
5.0.00.0020.0326.24
4.4.90.0020.0174.78
4.4.80.0020.0184.76
4.4.70.0050.0164.75
4.4.60.0020.0184.75
4.4.50.0020.0184.77
4.4.40.0030.0264.71
4.4.30.0040.0204.75
4.4.20.0040.0154.84
4.4.10.0050.0204.85
4.4.00.0030.0324.76
4.3.110.0030.0194.67
4.3.100.0040.0154.66
4.3.90.0020.0154.63
4.3.80.0030.0294.58
4.3.70.0040.0144.63
4.3.60.0020.0174.63
4.3.50.0040.0134.63
4.3.40.0050.0234.54
4.3.30.0040.0173.30
4.3.20.0010.0223.27
4.3.10.0030.0143.23
4.3.00.0000.01716.50

preferences:
42.21 ms | 401 KiB | 5 Q