3v4l.org

run code in 300+ PHP versions simultaneously
<?php $eggCount = 3; for($i = 1; $i <= $eggCount; $i++) { create("eggs", array($i => array("ID" => $i))); } function create($arrName, Array $arrKeys) { $lName = "$".strtolower($arrName); $$lName = array(); foreach($arrKeys as $key => $value) { $$lName[$key] = $value; } for($i = 1; $i <= $GLOBALS['eggCount']; $i++) { echo "Egg $i's ID: " . $eggs[$i]['ID']; } print_r($arrKeys); }

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.20
8.3.50.0090.00721.33
8.3.40.0070.00718.84
8.3.30.0040.01419.04
8.3.20.0050.00320.04
8.3.10.0030.00522.05
8.3.00.0070.00022.38
8.2.180.0090.00616.75
8.2.170.0070.01122.96
8.2.160.0060.01119.16
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00726.16
8.2.120.0050.00319.48
8.2.110.0060.00322.13
8.2.100.0100.00617.54
8.2.90.0050.00319.21
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0080.00018.03
8.2.50.0000.00818.07
8.2.40.0040.00418.47
8.2.30.0000.00818.22
8.2.20.0050.00217.66
8.2.10.0070.00017.73
8.2.00.0050.00317.67
8.1.280.0070.01025.92
8.1.270.0030.00622.19
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00324.05
8.1.230.0060.00618.77
8.1.220.0070.00017.74
8.1.210.0040.00418.77
8.1.200.0100.00017.47
8.1.190.0000.00917.52
8.1.180.0000.00918.70
8.1.170.0000.00818.59
8.1.160.0080.00022.13
8.1.150.0070.00018.61
8.1.140.0030.00517.43
8.1.130.0040.00417.72
8.1.120.0030.00317.37
8.1.110.0050.00317.36
8.1.100.0000.00717.36
8.1.90.0000.00717.48
8.1.80.0040.00417.45
8.1.70.0030.00317.37
8.1.60.0030.00617.47
8.1.50.0080.00017.45
8.1.40.0030.00717.56
8.1.30.0040.00417.63
8.1.20.0040.00417.62
8.1.10.0080.00017.45
8.1.00.0000.00717.39
8.0.300.0000.00718.77
8.0.290.0050.00317.05
8.0.280.0040.00418.36
8.0.270.0040.00417.25
8.0.260.0030.00316.79
8.0.250.0020.00517.03
8.0.240.0040.00417.00
8.0.230.0040.00316.95
8.0.220.0030.00616.98
8.0.210.0000.00716.87
8.0.200.0070.00017.07
8.0.190.0050.00316.89
8.0.180.0000.00716.94
8.0.170.0000.00916.92
8.0.160.0040.00416.80
8.0.150.0040.00316.86
8.0.140.0070.00016.94
8.0.130.0000.00513.31
8.0.120.0050.00316.81
8.0.110.0070.00016.86
8.0.100.0040.00417.00
8.0.90.0000.00816.90
8.0.80.0120.00917.02
8.0.70.0040.00416.76
8.0.60.0020.00516.95
8.0.50.0000.00716.84
8.0.30.0120.01217.17
8.0.20.0100.00917.40
8.0.10.0000.00716.94
8.0.00.0120.01016.62
7.4.330.0000.00515.00
7.4.320.0030.00316.59
7.4.300.0060.00016.36
7.4.290.0000.00716.52
7.4.280.0040.00416.67
7.4.270.0070.00016.51
7.4.260.0000.00916.41
7.4.250.0030.00616.46
7.4.240.0020.00516.57
7.4.230.0000.00716.63
7.4.220.0120.00816.56
7.4.210.0080.00816.61
7.4.200.0030.00316.35
7.4.190.0040.00416.69
7.4.160.0080.00816.79
7.4.150.0140.00717.40
7.4.140.0230.01117.86
7.4.130.0060.01116.52
7.4.120.0080.01016.54
7.4.110.0090.01216.66
7.4.100.0110.00716.54
7.4.90.0080.00716.46
7.4.80.0100.00719.39
7.4.70.0030.01416.36
7.4.60.0060.01116.64
7.4.50.0000.00816.41
7.4.40.0070.01022.77
7.4.30.0140.01116.66
7.4.00.0100.00715.10
7.3.330.0050.00013.39
7.3.320.0000.00513.29
7.3.310.0040.00316.33
7.3.300.0030.00316.30
7.3.290.0070.00716.37
7.3.280.0060.01116.45
7.3.270.0030.01317.40
7.3.260.0060.01216.67
7.3.250.0100.01016.52
7.3.240.0080.00816.44
7.3.230.0080.01116.39
7.3.210.0040.01216.63
7.3.200.0110.01119.39
7.3.190.0130.00916.43
7.3.180.0130.00316.36
7.3.170.0130.00416.44
7.3.160.0090.00616.52
7.3.120.0070.01114.93
7.2.330.0030.01716.57
7.2.320.0120.00916.79
7.2.310.0090.00916.64
7.2.300.0100.00716.55
7.2.290.0040.01216.58
7.2.00.0060.00619.41
7.1.100.0090.00618.38
7.1.70.0000.00717.07
7.1.60.0060.01219.82
7.1.50.0000.01816.96
7.1.00.0070.03022.54
7.0.200.0030.00716.77
7.0.140.0030.07322.10
7.0.60.0070.08720.09
7.0.50.0130.07317.95
7.0.40.0130.05720.27
7.0.30.0370.03020.09
7.0.20.0330.06720.15
7.0.10.0070.09320.33
7.0.00.0230.06720.45
5.6.280.0030.07320.89
5.6.210.0200.06720.57
5.6.200.0030.08018.17
5.6.190.0030.08720.44
5.6.180.3700.05020.39
5.6.170.0230.07320.50
5.6.160.0100.03720.48
5.6.150.0130.04018.18
5.6.140.0200.07318.15
5.6.130.0100.04318.18
5.6.120.0130.03320.95
5.6.110.0070.08720.96
5.6.100.0200.07321.03
5.6.90.0130.07720.98
5.6.80.0170.07320.54
5.6.70.4170.03720.38
5.5.350.0130.06720.45
5.5.340.0030.07317.95
5.5.330.0130.06020.57
5.5.320.0070.04020.14
5.5.310.0270.06020.24
5.5.300.0000.04318.03
5.5.290.0100.06317.97
5.5.280.0130.07720.78
5.5.270.0070.03720.76
5.5.260.0170.07020.68
5.5.250.0170.06720.58
5.5.240.0270.07020.16
5.4.450.0700.06319.48
5.4.440.0630.06719.38
5.4.430.0300.04719.57
5.4.420.0830.04719.61
5.4.410.0900.04319.31
5.4.400.0230.06018.51
5.4.390.0500.05018.79
5.4.380.0370.06718.63
5.4.370.0330.03318.76
5.4.360.0070.05718.79
5.4.350.0230.04718.79
5.4.340.0070.06018.78
5.4.320.0060.04112.50
5.4.310.0070.04212.50
5.4.300.0070.03612.50
5.4.290.0070.04212.50
5.4.280.0030.03912.40
5.4.270.0050.04412.39
5.4.260.0070.05319.09
5.4.250.0070.05718.71
5.4.240.0100.08018.83
5.4.230.0030.06318.94
5.4.220.0070.06018.89
5.4.210.0200.05018.82
5.4.200.0070.06018.96
5.4.190.0130.05318.94
5.4.180.0100.06019.02
5.4.170.0170.05018.73
5.4.160.0100.05718.95
5.4.150.0070.05318.95
5.4.140.0130.06016.36
5.4.130.0170.04316.48
5.4.120.0070.05316.53
5.4.110.0030.05716.41
5.4.100.0130.05716.47
5.4.90.0030.05316.46
5.4.80.0070.05016.39
5.4.70.0170.06016.54
5.4.60.0100.05016.52
5.4.50.0170.07016.38
5.4.40.0100.07316.59
5.4.30.0170.05316.33
5.4.20.0130.05716.64
5.4.10.0130.06016.45
5.4.00.0130.05315.81
5.3.290.0110.03412.80
5.3.280.0170.04314.77
5.3.270.0070.07714.68
5.3.260.0070.05714.69
5.3.250.0070.05314.78
5.3.240.0170.04714.69
5.3.230.0130.05714.68
5.3.220.0100.07314.65
5.3.210.0070.05314.73
5.3.200.0170.04314.65
5.3.190.0000.07014.65
5.3.180.0100.07014.65
5.3.170.0030.05314.55
5.3.160.0030.05314.58
5.3.150.0000.06014.65
5.3.140.0100.06314.64
5.3.130.0030.06014.38
5.3.120.0100.06314.77
5.3.110.0100.07314.56
5.3.100.0100.05714.20
5.3.90.0170.05314.10
5.3.80.0070.05714.19
5.3.70.0100.05314.11
5.3.60.0100.07013.98
5.3.50.0030.07013.95
5.3.40.0100.05713.94
5.3.30.0130.07013.92
5.3.20.0070.07013.53
5.3.10.0170.05713.71
5.3.00.0130.06713.73
5.2.170.0070.06011.23
5.2.160.0100.04311.23
5.2.150.0130.05711.32
5.2.140.0070.04711.23
5.2.130.0030.04711.05
5.2.120.0030.06011.10
5.2.110.0100.06011.17
5.2.100.0070.06010.93
5.2.90.0100.03711.18
5.2.80.0100.04711.04
5.2.70.0030.05311.31
5.2.60.0070.04710.89
5.2.50.0130.04011.18
5.2.40.0100.04710.96
5.2.30.0130.04711.06
5.2.20.0070.04010.96
5.2.10.0100.05311.04
5.2.00.0070.05310.71
5.1.60.0070.05010.07
5.1.50.0170.03010.04
5.1.40.0100.03010.22
5.1.30.0100.05010.55
5.1.20.0100.03310.18
5.1.10.0070.03710.16
5.1.00.0070.0439.86
5.0.50.0030.0378.68
5.0.40.0000.0438.68
5.0.30.0130.0478.68
5.0.20.0070.0338.68
5.0.10.0030.0408.68
5.0.00.0000.0578.68
4.4.90.0070.0278.68
4.4.80.0000.0238.68
4.4.70.0000.0278.68
4.4.60.0030.0208.68
4.4.50.0030.0308.68
4.4.40.0030.0478.68
4.4.30.0070.0238.68
4.4.20.0030.0238.68
4.4.10.0070.0238.68
4.4.00.0070.0438.68
4.3.110.0070.0278.68
4.3.100.0100.0208.68
4.3.90.0030.0278.68
4.3.80.0000.0378.68
4.3.70.0030.0278.68
4.3.60.0070.0238.68
4.3.50.0030.0308.68
4.3.40.0100.0308.68
4.3.30.0070.0278.68
4.3.20.0030.0278.68
4.3.10.0070.0238.68
4.3.00.0170.0207.70

preferences:
40.97 ms | 401 KiB | 5 Q