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(array()); foreach($arrKeys as $key => $value) { $$lName[$key] = $value; } for($i = 1; $i <= $GLOBALS['eggCount']; $i++) { echo "Egg $i's ID: " . $$lName[$i]; } print_r($$lName[0]); }

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.52
8.3.50.0100.00521.27
8.3.40.0140.00018.97
8.3.30.0150.00719.13
8.3.20.0070.00020.41
8.3.10.0080.00022.09
8.3.00.0040.01122.43
8.2.180.0060.01216.75
8.2.170.0090.00922.96
8.2.160.0140.00019.00
8.2.150.0000.00924.18
8.2.140.0060.00324.66
8.2.130.0040.00826.16
8.2.120.0030.00519.48
8.2.110.0070.00421.02
8.2.100.0030.00917.91
8.2.90.0000.00819.34
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0050.00518.16
8.2.50.0000.00818.10
8.2.40.0000.00720.46
8.2.30.0070.00018.13
8.2.20.0040.00417.84
8.2.10.0040.00417.81
8.2.00.0000.00817.81
8.1.280.0170.00025.92
8.1.270.0000.00822.24
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.66
8.1.230.0090.00317.70
8.1.220.0040.00417.77
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0000.00818.71
8.1.160.0050.00322.13
8.1.150.0040.00418.69
8.1.140.0000.00717.45
8.1.130.0030.00317.70
8.1.120.0000.00717.39
8.1.110.0030.00517.39
8.1.100.0040.00417.41
8.1.90.0070.00017.44
8.1.80.0000.00717.41
8.1.70.0030.00317.35
8.1.60.0060.00317.61
8.1.50.0050.00217.56
8.1.40.0050.00217.46
8.1.30.0080.00017.68
8.1.20.0040.00417.50
8.1.10.0030.00617.59
8.1.00.0060.00317.52
8.0.300.0020.00518.77
8.0.290.0030.00516.75
8.0.280.0070.00018.32
8.0.270.0000.00716.88
8.0.260.0050.00316.87
8.0.250.0070.00017.06
8.0.240.0070.00017.00
8.0.230.0000.00717.00
8.0.220.0040.00416.89
8.0.210.0040.00416.86
8.0.200.0060.00016.97
8.0.190.0040.00417.04
8.0.180.0030.00316.89
8.0.170.0000.00816.98
8.0.160.0040.00416.98
8.0.150.0040.00416.86
8.0.140.0000.00716.92
8.0.130.0030.00313.47
8.0.120.0080.00016.83
8.0.110.0020.00516.92
8.0.100.0040.00416.84
8.0.90.0070.00016.79
8.0.80.0040.01216.88
8.0.70.0040.00416.99
8.0.60.0040.00416.90
8.0.50.0000.00816.78
8.0.30.0080.01116.98
8.0.20.0110.00817.40
8.0.10.0040.00416.98
8.0.00.0140.00416.74
7.4.330.0000.00515.00
7.4.320.0030.00316.51
7.4.300.0000.00616.62
7.4.290.0030.00316.61
7.4.280.0040.00416.59
7.4.270.0030.00316.51
7.4.260.0070.00316.46
7.4.250.0040.00416.56
7.4.240.0050.00216.64
7.4.230.0030.00316.66
7.4.220.0070.01016.53
7.4.210.0070.00716.47
7.4.200.0040.00416.50
7.4.190.0040.00316.57
7.4.160.0130.00316.71
7.4.150.0140.00317.40
7.4.140.0080.01417.86
7.4.130.0100.00716.47
7.4.120.0120.00716.62
7.4.110.0180.00316.56
7.4.100.0090.00916.77
7.4.90.0110.00916.35
7.4.80.0060.01219.39
7.4.70.0000.01616.66
7.4.60.0100.00716.50
7.4.50.0080.00016.58
7.4.40.0070.01022.77
7.4.30.0080.00816.53
7.4.00.0100.00715.00
7.3.330.0030.00313.50
7.3.320.0030.00313.50
7.3.310.0000.00716.47
7.3.300.0040.00416.39
7.3.290.0100.00316.47
7.3.280.0070.00816.43
7.3.270.0080.00817.40
7.3.260.0040.01416.40
7.3.250.0100.00816.37
7.3.240.0030.01416.41
7.3.230.0110.00616.51
7.3.210.0030.01316.42
7.3.200.0080.00819.39
7.3.190.0130.00416.62
7.3.180.0060.00916.40
7.3.170.0120.00916.46
7.3.160.0070.01316.48
7.3.120.0130.00314.98
7.3.110.0150.00415.12
7.3.100.0090.00614.88
7.3.90.0070.00314.92
7.3.80.0040.00714.86
7.3.70.0120.00415.00
7.3.60.0030.01014.93
7.3.50.0030.01214.55
7.3.40.0100.00314.90
7.3.30.0060.00614.63
7.3.20.0080.00816.52
7.3.10.0070.00716.46
7.3.00.0110.00316.47
7.2.330.0140.01016.54
7.2.320.0150.00616.64
7.2.310.0090.00816.69
7.2.300.0130.00316.57
7.2.290.0090.00916.75
7.2.250.0100.01014.70
7.2.240.0030.01415.03
7.2.230.0070.00715.06
7.2.220.0150.00015.23
7.2.210.0070.00715.18
7.2.200.0040.01515.27
7.2.190.0090.00615.12
7.2.180.0030.01015.09
7.2.170.0080.00315.07
7.2.60.0100.00617.02
7.2.00.0050.00519.51
7.1.330.0100.00615.94
7.1.320.0060.00915.53
7.1.310.0040.00815.71
7.1.300.0030.01215.77
7.1.290.0040.00815.88
7.1.280.0030.00715.82
7.1.270.0030.00715.60
7.1.260.0090.00615.52
7.1.200.0060.00615.86
7.1.70.0040.00817.38
7.1.60.0100.00017.30
7.1.50.0150.00334.92
7.1.00.0000.06722.57
7.0.200.0040.00416.77
7.0.140.0000.08022.18
7.0.60.0170.06019.94
7.0.50.0030.05317.88
7.0.40.0000.04720.23
7.0.30.0400.07020.09
7.0.20.0070.05020.06
7.0.10.0070.04020.15
7.0.00.0100.07720.33
5.6.280.0000.07721.04
5.6.210.0030.04320.73
5.6.200.0070.08018.14
5.6.190.0030.04720.61
5.6.180.0270.05320.55
5.6.170.0230.06320.55
5.6.160.0100.08020.56
5.6.150.0100.07318.18
5.6.140.0070.04318.27
5.6.130.0130.07718.15
5.6.120.0100.03720.98
5.6.110.0070.04021.05
5.6.100.0070.05320.98
5.6.90.0030.08320.97
5.6.80.0100.08020.37
5.5.350.0270.07320.53
5.5.340.0070.08717.99
5.5.330.0000.05020.57
5.5.320.3100.04720.34
5.5.310.0230.08020.24
5.5.300.0100.08018.01
5.5.290.0030.04018.00
5.5.280.0070.04720.68
5.5.270.0070.08720.83
5.5.260.0070.08320.87
5.5.250.0100.03320.58
5.5.240.0030.07720.07
5.4.450.0930.05019.58
5.4.440.0070.08019.59
5.4.430.0130.07019.68
5.4.420.0230.04719.33
5.4.410.0130.07318.85
5.4.400.0300.05018.82
5.4.390.0330.05718.52
5.4.380.0230.05718.73
5.4.370.0070.06018.56
5.4.360.0230.04318.79
5.4.350.0200.04718.62
5.4.340.0130.06018.50
5.4.320.0060.04712.50
5.4.310.0050.03912.50
5.4.300.0040.04312.50
5.4.290.0040.04512.50
5.4.280.0080.04212.40
5.4.270.0050.03712.40
5.4.260.0000.05718.95
5.4.250.0070.05318.93
5.4.240.0100.05318.93
5.4.230.0130.04718.74
5.4.220.0130.06018.77
5.4.210.0000.07018.98
5.4.200.0100.04718.90
5.4.190.0000.05718.76
5.4.180.0100.07318.81
5.4.170.0070.05018.89
5.4.160.0030.08019.06
5.4.150.0030.05318.90
5.4.140.0100.04316.43
5.4.130.0200.04716.55
5.4.120.0130.04316.56
5.4.110.0030.05316.56
5.4.100.0070.05716.33
5.4.90.0100.06716.43
5.4.80.0200.06316.46
5.4.70.0030.06016.46
5.4.60.0100.04716.33
5.4.50.0030.05316.38
5.4.40.0070.04716.60
5.4.30.0030.05016.41
5.4.20.0070.04716.54
5.4.10.0130.04016.57
5.4.00.0070.04716.00
5.3.290.0080.05212.80
5.3.280.0000.05714.76
5.3.270.0100.05014.78
5.3.260.0100.07014.59
5.3.250.0070.05014.68
5.3.240.0030.05314.59
5.3.230.0070.07314.68
5.3.220.0000.05314.54
5.3.210.0000.05714.63
5.3.200.0030.07314.39
5.3.190.0070.05714.70
5.3.180.0100.04714.54
5.3.170.0000.05314.46
5.3.160.0070.05714.57
5.3.150.0170.06314.79
5.3.140.0070.05014.73
5.3.130.0070.06314.77
5.3.120.0000.05314.68
5.3.110.0030.06314.68
5.3.100.0000.05314.21
5.3.90.0000.05714.00
5.3.80.0000.05314.08
5.3.70.0100.05014.18
5.3.60.0100.04013.83
5.3.50.0070.05013.85
5.3.40.0070.06714.02
5.3.30.0030.06013.99
5.3.20.0000.05713.76
5.3.10.0030.06713.63
5.3.00.0070.07013.72
5.2.170.0070.05711.23
5.2.160.0030.04311.23
5.2.150.0170.04311.13
5.2.140.0070.04711.25
5.2.130.0100.05011.11
5.2.120.0030.04011.09
5.2.110.0070.05011.10
5.2.100.0030.05711.08
5.2.90.0030.05311.16
5.2.80.0070.06711.17
5.2.70.0070.05311.09
5.2.60.0030.05311.04
5.2.50.0000.04711.09
5.2.40.0030.05311.00
5.2.30.0100.03311.03
5.2.20.0070.04310.91
5.2.10.0000.04010.85
5.2.00.0030.03710.56
5.1.60.0030.0379.95
5.1.50.0030.04310.15
5.1.40.0030.0339.98
5.1.30.0000.04010.41
5.1.20.0000.03710.26
5.1.10.0030.03310.05
5.1.00.0000.03710.03
5.0.50.0000.0309.07
5.0.40.0000.0279.07
5.0.30.0030.0409.07
5.0.20.0000.0279.07
5.0.10.0000.0309.07
5.0.00.0000.0439.07
4.4.90.0030.0279.07
4.4.80.0030.0209.07
4.4.70.0100.0209.07
4.4.60.0070.0179.07
4.4.50.0030.0209.07
4.4.40.0000.0339.07
4.4.30.0030.0209.07
4.4.20.0030.0209.07
4.4.10.0030.0209.07
4.4.00.0030.0379.07
4.3.110.0030.0209.07
4.3.100.0030.0179.07
4.3.90.0000.0209.07
4.3.80.0030.0339.07
4.3.70.0000.0309.07
4.3.60.0030.0309.07
4.3.50.0030.0309.07
4.3.40.0000.0339.07
4.3.30.0030.0279.07
4.3.20.0000.0239.07
4.3.10.0030.0209.07
4.3.00.0070.0206.84

preferences:
53.08 ms | 401 KiB | 5 Q