3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = "XXXXX"; $test = array($key => "test5"); for ($x = 0; $x < 500; $x++) { $key .= "X"; $value = "test" . strlen($key); $test[$key] = $value; } echo "<pre>"; print_r($test); echo "</pre>"; ?>

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.70.0170.00716.88
8.3.60.0110.00718.18
8.3.50.0150.00821.21
8.3.40.0190.00418.95
8.3.30.0110.01119.04
8.3.20.0090.00519.10
8.3.10.0080.00021.27
8.3.00.0000.00823.70
8.2.180.0170.01016.88
8.2.170.0250.00022.96
8.2.160.0260.00820.77
8.2.150.0140.00024.18
8.2.140.0140.00624.66
8.2.130.0040.00426.16
8.2.120.0040.00421.07
8.2.110.0120.00020.80
8.2.100.0120.00018.16
8.2.90.0060.00319.61
8.2.80.0000.00819.64
8.2.70.0060.00617.88
8.2.60.0070.00318.13
8.2.50.0000.01118.07
8.2.40.0050.00518.41
8.2.30.0040.00419.81
8.2.20.0000.00918.07
8.2.10.0040.00418.24
8.2.00.0070.00018.12
8.1.280.0080.01225.92
8.1.270.0050.00523.99
8.1.260.0120.00026.35
8.1.250.0130.00728.09
8.1.240.0070.00722.66
8.1.230.0050.00921.05
8.1.220.0040.00418.77
8.1.210.0100.00019.20
8.1.200.0060.00317.60
8.1.190.0040.00417.90
8.1.180.0050.00518.10
8.1.170.0030.00618.84
8.1.160.0040.00419.11
8.1.150.0040.00418.94
8.1.140.0000.00717.80
8.1.130.0000.00918.25
8.1.120.0000.00917.79
8.1.110.0050.00517.71
8.1.100.0000.00917.65
8.1.90.0030.00617.80
8.1.80.0070.00217.66
8.1.70.0030.00617.66
8.1.60.0070.00417.87
8.1.50.0110.00017.72
8.1.40.0060.00317.78
8.1.30.0000.00817.94
8.1.20.0050.00517.96
8.1.10.0080.00317.87
8.1.00.0100.00017.78
8.0.300.0090.00020.01
8.0.290.0040.00417.29
8.0.280.0050.00518.60
8.0.270.0040.00417.54
8.0.260.0000.00716.96
8.0.250.0000.00817.11
8.0.240.0050.00517.05
8.0.230.0030.00617.09
8.0.220.0000.00817.11
8.0.210.0050.00517.17
8.0.200.0040.00417.12
8.0.190.0040.00417.21
8.0.180.0040.00417.17
8.0.170.0000.00917.17
8.0.160.0090.00017.14
8.0.150.0000.00916.94
8.0.140.0070.00316.98
8.0.130.0070.00013.55
8.0.120.0080.00317.08
8.0.110.0000.00916.88
8.0.100.0000.00817.01
8.0.90.0000.00917.04
8.0.80.0230.00017.07
8.0.70.0050.00416.84
8.0.60.0040.00417.02
8.0.50.0000.00917.07
8.0.30.0160.01217.25
8.0.20.0130.01317.50
8.0.10.0060.00317.18
8.0.00.0130.00917.02
7.4.330.0030.00316.84
7.4.320.0090.00016.63
7.4.300.0040.00416.54
7.4.290.0000.00816.61
7.4.280.0050.00516.62
7.4.270.0090.00016.55
7.4.260.0000.00713.58
7.4.250.0050.00516.44
7.4.240.0040.00516.61
7.4.230.0050.00516.73
7.4.220.0310.00416.54
7.4.210.0100.00816.67
7.4.200.0080.00016.54
7.4.190.0090.00016.78
7.4.160.0140.01116.82
7.4.150.0130.00917.40
7.4.140.0150.01217.86
7.4.130.0120.01416.71
7.4.120.0130.00916.75
7.4.110.0130.01016.56
7.4.100.0140.01416.80
7.4.90.0210.00716.77
7.4.80.0180.01319.39
7.4.70.0320.01016.64
7.4.60.0190.00316.81
7.4.50.0100.00316.70
7.4.40.0120.01222.77
7.4.30.0210.00916.75
7.4.00.0060.00615.23
7.3.330.0080.00013.61
7.3.320.0050.00313.37
7.3.310.0000.00916.53
7.3.300.0030.00616.44
7.3.290.0150.00716.55
7.3.280.0140.01116.52
7.3.270.0170.01417.40
7.3.260.0160.00818.24
7.3.250.0170.00816.47
7.3.240.0150.00416.46
7.3.230.0160.01016.63
7.3.210.0170.00816.64
7.3.200.0120.00819.39
7.3.190.0260.01016.88
7.3.180.0090.01416.59
7.3.170.0140.00716.63
7.3.160.0170.00216.48
7.3.120.0070.01114.96
7.2.330.0120.01216.73
7.2.320.0100.01516.68
7.2.310.0180.01316.67
7.2.300.0090.01416.68
7.2.290.0050.02016.86
7.2.60.0130.00016.78
7.2.00.0070.00719.48
7.1.200.0120.00015.71
7.1.100.0000.01118.13
7.1.70.0030.00717.20
7.1.60.0000.01217.41
7.1.50.0030.00916.85
7.0.200.0060.01116.39

preferences:
51.63 ms | 401 KiB | 5 Q