3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('MAX_LOOPS',5); function withRefValue($elements, $transform) { for ($i=0; $i<$elements; $i++) { $a[] = "v.$i"; } $counter=0; foreach ($a as $k=>$v) { eval($transform); $counter++; if ($counter>MAX_LOOPS) { break; } } echo "--> State of array after loop:\n"; var_dump($a); } echo "\nPopping elements off end of an unreferenced array, using &\$value."; $transform = 'array_pop($a);'; withRefValue(1, $transform); withRefValue(2, $transform); withRefValue(3, $transform); withRefValue(4, $transform); withRefValue(5, $transform); withRefValue(6, $transform); withRefValue(7, $transform); withRefValue(8, $transform); withRefValue(9, $transform); withRefValue(10, $transform); withRefValue(11, $transform); withRefValue(12, $transform);

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.0040.01116.63
8.3.50.0090.00922.91
8.3.40.0070.00718.79
8.3.30.0080.00818.92
8.3.20.0040.00420.38
8.3.10.0000.00723.48
8.3.00.0070.00317.50
8.2.180.0110.00725.92
8.2.170.0090.00622.96
8.2.160.0110.00420.39
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0090.00026.16
8.2.120.0040.00421.15
8.2.110.0070.00322.25
8.2.100.0090.00619.45
8.2.90.0030.00619.01
8.2.80.0050.00317.97
8.2.70.0060.00317.38
8.2.60.0040.00418.05
8.2.50.0070.00318.07
8.2.40.0000.00818.22
8.2.30.0040.00418.23
8.2.20.0040.00417.81
8.2.10.0000.00818.10
8.2.00.0060.00317.76
8.1.280.0090.00625.92
8.1.270.0030.01223.86
8.1.260.0070.00026.35
8.1.250.0090.00628.09
8.1.240.0120.00020.66
8.1.230.0070.00418.98
8.1.220.0000.00917.74
8.1.210.0000.00918.77
8.1.200.0030.00717.36
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0040.00418.49
8.1.160.0040.00422.04
8.1.150.0020.00518.87
8.1.140.0040.00417.46
8.1.130.0050.00217.71
8.1.120.0040.00417.38
8.1.110.0050.00317.36
8.1.100.0000.00717.44
8.1.90.0040.00417.51
8.1.80.0070.00017.54
8.1.70.0000.00717.34
8.1.60.0030.00617.52
8.1.50.0000.00817.47
8.1.40.0000.00817.42
8.1.30.0030.00617.67
8.1.20.0090.00317.56
8.1.10.0030.00617.59
8.1.00.0000.00817.41
8.0.300.0030.00618.77
8.0.290.0040.00416.63
8.0.280.0040.00418.46
8.0.270.0040.00417.27
8.0.260.0030.00317.27
8.0.250.0070.00016.92
8.0.240.0040.00417.03
8.0.230.0000.00816.85
8.0.220.0030.00316.76
8.0.210.0050.00316.91
8.0.200.0000.00717.01
8.0.190.0030.00616.86
8.0.180.0080.00016.89
8.0.170.0050.00316.83
8.0.160.0040.00416.97
8.0.150.0040.00416.89
8.0.140.0040.00616.77
8.0.130.0000.00713.33
8.0.120.0030.00516.91
8.0.110.0040.00416.92
8.0.100.0070.00016.71
8.0.90.0050.00216.78
8.0.80.0040.01616.92
8.0.70.0080.00016.93
8.0.60.0000.00916.92
8.0.50.0040.00416.95
8.0.30.0090.01017.05
8.0.20.0140.00717.40
8.0.10.0000.00716.97
8.0.00.0130.01016.71
7.4.330.0030.00315.00
7.4.320.0000.00616.51
7.4.300.0030.00316.65
7.4.290.0030.00316.52
7.4.280.0020.00516.41
7.4.270.0000.00716.61
7.4.260.0000.00716.61
7.4.250.0000.00816.59
7.4.240.0000.00716.52
7.4.230.0090.00016.50
7.4.220.0160.00316.63
7.4.210.0090.00616.70
7.4.200.0040.00416.31
7.4.160.0080.00816.43
7.4.150.0100.01017.40
7.4.140.0080.01117.86
7.4.130.0170.00316.47
7.4.120.0080.01116.46
7.4.110.0150.00316.70
7.4.100.0080.01016.66
7.4.90.0120.00916.51
7.4.80.0030.01519.39
7.4.70.0210.00616.50
7.4.60.0090.01116.57
7.4.50.0050.00016.25
7.4.40.0090.01516.57
7.4.30.0000.01916.50
7.4.00.0060.01214.89
7.3.330.0030.00313.16
7.3.320.0000.00513.36
7.3.310.0030.00316.35
7.3.300.0070.00016.22
7.3.290.0140.00016.42
7.3.280.0070.01116.39
7.3.270.0140.00317.40
7.3.260.0130.00616.30
7.3.240.0070.01016.35
7.3.230.0080.00816.64
7.3.210.0100.01016.32
7.3.200.0180.00019.39
7.3.190.0080.01616.40
7.3.180.0040.01216.55
7.3.170.0030.01516.59
7.3.160.0120.00416.59
7.3.120.0030.01514.85
7.3.110.0060.01214.79
7.3.100.0060.01014.65
7.3.90.0070.00614.91
7.3.80.0060.00614.86
7.3.70.0080.01014.81
7.3.60.0070.00714.66
7.3.50.0050.00914.80
7.3.40.0060.00714.78
7.3.30.0060.00914.87
7.3.20.0040.01016.54
7.3.10.0060.00916.63
7.3.00.0040.01016.68
7.2.330.0070.01316.68
7.2.320.0140.00916.77
7.2.310.0160.00616.70
7.2.300.0070.01716.80
7.2.290.0070.01116.87
7.2.250.0100.01015.13
7.2.240.0070.01315.15
7.2.230.0060.01015.18
7.2.220.0100.00214.95
7.2.210.0030.01215.12
7.2.200.0060.01015.08
7.2.190.0040.01215.04
7.2.180.0030.01215.12
7.2.170.0050.01015.15
7.2.60.0060.00616.95
7.2.00.0040.00419.24
7.1.330.0080.00915.93
7.1.320.0060.00615.82
7.1.310.0100.00515.90
7.1.300.0050.00915.73
7.1.290.0030.00915.72
7.1.280.0080.00815.82
7.1.270.0090.00415.90
7.1.260.0080.00615.81
7.1.200.0050.00515.70
7.1.100.0030.01018.26
7.1.70.0100.00017.38
7.1.60.0100.01719.40
7.1.50.0150.00317.02
7.1.00.0030.07722.48
7.0.200.0000.00716.64
7.0.140.0100.06322.12
7.0.100.0170.04719.99
7.0.90.0030.08019.96
7.0.80.0030.05020.17
7.0.70.0100.07719.90
7.0.60.0070.06720.01
7.0.50.0130.07320.34
7.0.40.0100.07720.09
7.0.30.0130.08020.13
7.0.20.0130.10720.10
7.0.10.0100.07320.07
7.0.00.0000.05019.95
5.6.280.0070.06720.93
5.6.250.0100.07320.52
5.6.240.0130.04720.58
5.6.230.0100.07020.68
5.6.220.0070.04320.50
5.6.210.0200.06320.49
5.6.200.0030.07021.05
5.6.190.0130.07721.11
5.6.180.0070.04321.14
5.6.170.0030.04720.94
5.6.160.0070.04721.06
5.6.150.0130.07321.14
5.6.140.0130.07721.11
5.6.130.0000.10321.02
5.6.120.0070.08021.06
5.6.110.0100.07721.08
5.6.100.0130.07721.03
5.6.90.0070.08320.92
5.6.80.0070.06320.53
5.6.70.0070.07320.43
5.6.60.0100.07720.42
5.6.50.0070.05720.33
5.6.40.0100.04320.40
5.6.30.0100.03320.36
5.6.20.0130.04020.38
5.6.10.0070.05720.38
5.6.00.0200.07020.43
5.5.380.0030.07720.43
5.5.370.0100.04720.36
5.5.360.0070.04020.36
5.5.350.0070.08720.46
5.5.340.0030.07320.90
5.5.330.0100.07720.75
5.5.320.0130.05020.78
5.5.310.0100.07020.88
5.5.300.0070.08320.65
5.5.290.0030.08020.88
5.5.280.0100.04720.74
5.5.270.0130.05320.86
5.5.260.0130.07320.77
5.5.250.0130.07320.65
5.5.240.0000.05320.17
5.5.230.0100.07320.16
5.5.220.0070.07720.21
5.5.210.0070.07720.15
5.5.200.0130.03020.00
5.5.190.0130.04320.13
5.5.180.0100.03720.19
5.5.160.0130.07320.18
5.5.150.0130.07319.99
5.5.140.0130.08720.18
5.5.130.0100.06320.24
5.5.120.0130.03719.99
5.5.110.0070.06020.19
5.5.100.0130.05720.09
5.5.90.0030.05020.16
5.5.80.0100.05020.10
5.5.70.0030.08020.02
5.5.60.0100.07020.06
5.5.50.0100.04019.97
5.5.40.0000.06020.07
5.5.30.0030.04720.15
5.5.20.0100.08720.04
5.5.10.0000.08020.08
5.5.00.0130.04320.04
5.4.450.0170.07719.28
5.4.440.0100.07719.35
5.4.430.0100.07319.20
5.4.420.0000.06019.49
5.4.410.0000.05319.11
5.4.400.0170.06019.23
5.4.390.0000.04318.85
5.4.380.0170.06719.13
5.4.370.0070.07019.10
5.4.360.0030.04718.90
5.4.350.0070.04019.05
5.4.340.0070.06019.04
5.4.320.0200.06319.18
5.4.310.0100.07019.16
5.4.300.0100.07019.03
5.4.290.0130.07019.09
5.4.280.0130.07018.88
5.4.270.0070.07018.95
5.4.260.0070.06018.90
5.4.250.0000.07018.87
5.4.240.0030.05318.90
5.4.230.0070.05719.03
5.4.220.0000.08019.04
5.4.210.0130.05718.89
5.4.200.0070.07319.10
5.4.190.0100.06018.98
5.4.180.0070.07718.87
5.4.170.0030.07019.15
5.4.160.0170.08018.84
5.4.150.0070.07019.02
5.4.140.0070.07316.46
5.4.130.0000.04016.43
5.4.120.0030.08316.43
5.4.110.0100.07316.37
5.4.100.0100.05316.50
5.4.90.0130.05316.52
5.4.80.0100.07016.43
5.4.70.0100.07016.49
5.4.60.0070.07016.38
5.4.50.0070.07316.48
5.4.40.0100.07016.54
5.4.30.0100.04316.41
5.4.20.0200.05716.38
5.4.10.0100.06716.41
5.4.00.0130.06315.75
5.3.290.0000.05014.63
5.3.280.0030.08714.70
5.3.270.0070.08014.60
5.3.260.0070.07714.66
5.3.250.0030.07714.63
5.3.240.0070.07314.73
5.3.230.0000.07714.63
5.3.220.0130.07314.67
5.3.210.0100.07314.56
5.3.200.0070.08014.66
5.3.190.0100.07314.59
5.3.180.0070.08314.58
5.3.170.0100.07314.63
5.3.160.0100.07714.58
5.3.150.0100.05714.52
5.3.140.0100.06714.63
5.3.130.0070.04714.73
5.3.120.0070.07014.56
5.3.110.0130.04014.73
5.3.100.0070.06014.13
5.3.90.0030.07714.19
5.3.80.0030.05313.98
5.3.70.0100.07014.18
5.3.60.0070.06014.09
5.3.50.0000.08013.88
5.3.40.0100.07013.91
5.3.30.0130.03714.04
5.3.20.0000.08313.75
5.3.10.0070.04013.71
5.3.00.0070.05713.59
5.2.170.0070.06011.28
5.2.160.0100.02711.05
5.2.150.0100.05711.21
5.2.140.0070.05711.30
5.2.130.0070.05311.15
5.2.120.0030.03011.16
5.2.110.0000.05711.06
5.2.100.0130.04711.05
5.2.90.0000.05011.16
5.2.80.0130.05311.26
5.2.70.0070.06011.05
5.2.60.0000.04311.16
5.2.50.0000.04011.07
5.2.40.0030.03011.07
5.2.30.0070.05711.00
5.2.20.0100.05710.98
5.2.10.0030.04710.98
5.2.00.0100.06010.80
5.1.60.0000.04010.01
5.1.50.0130.05010.12
5.1.40.0000.0339.97
5.1.30.0070.05310.44
5.1.20.0000.04710.45
5.1.10.0000.04710.08
5.1.00.0100.04310.16
5.0.50.0030.0478.64
5.0.40.0100.0408.31
5.0.30.0000.0538.12
5.0.20.0030.0338.10
5.0.10.0000.0278.10
5.0.00.0000.0678.10
4.4.90.0000.0338.10
4.4.80.0070.0208.10
4.4.70.0030.0378.10
4.4.60.0100.0278.10
4.4.50.0000.0308.10
4.4.40.0070.0538.10
4.4.30.0000.0338.10
4.4.20.0130.0078.10
4.4.10.0030.0208.10
4.4.00.0030.0538.10
4.3.110.0070.0308.10
4.3.100.0000.0378.10
4.3.90.0070.0338.10
4.3.80.0030.0538.10
4.3.70.0000.0408.10
4.3.60.0000.0338.10
4.3.50.0000.0378.10
4.3.40.0000.0378.10
4.3.30.0000.0338.10
4.3.20.0000.0408.10
4.3.10.0000.0408.10
4.3.00.0070.0338.10

preferences:
43.59 ms | 401 KiB | 5 Q