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

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.0060.00918.30
8.3.50.0090.00921.14
8.3.40.0070.01018.83
8.3.30.0080.00619.21
8.3.20.0050.00320.21
8.3.10.0040.00422.03
8.3.00.0140.00020.65
8.2.180.0060.00916.50
8.2.170.0070.01122.96
8.2.160.0080.00819.31
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00422.13
8.2.110.0070.00420.38
8.2.100.0090.00317.78
8.2.90.0050.00319.21
8.2.80.0000.00817.97
8.2.70.0000.01017.63
8.2.60.0080.00017.92
8.2.50.0000.00818.07
8.2.40.0000.00918.16
8.2.30.0040.00418.13
8.2.20.0000.00817.71
8.2.10.0000.00717.71
8.2.00.0030.00617.61
8.1.280.0030.01425.92
8.1.270.0050.00322.14
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0030.00623.81
8.1.230.0070.00420.96
8.1.220.0000.00717.78
8.1.210.0030.00518.77
8.1.200.0000.00817.35
8.1.190.0000.00817.55
8.1.180.0040.00418.53
8.1.170.0030.00618.54
8.1.160.0030.00322.07
8.1.150.0030.00618.69
8.1.140.0040.00417.39
8.1.130.0030.00317.90
8.1.120.0000.00717.43
8.1.110.0000.00717.44
8.1.100.0040.00417.42
8.1.90.0000.00817.33
8.1.80.0000.00817.31
8.1.70.0030.00317.36
8.1.60.0030.00617.52
8.1.50.0040.00417.51
8.1.40.0070.00017.50
8.1.30.0000.00717.45
8.1.20.0040.00417.69
8.1.10.0040.00417.57
8.1.00.0040.00417.35
8.0.300.0080.00018.77
8.0.290.0000.00717.04
8.0.280.0040.00418.35
8.0.270.0030.00317.15
8.0.260.0030.00316.80
8.0.250.0030.00316.96
8.0.240.0040.00416.86
8.0.230.0030.00316.96
8.0.220.0030.00316.91
8.0.210.0030.00516.92
8.0.200.0060.00016.82
8.0.190.0030.00516.98
8.0.180.0000.00716.80
8.0.170.0000.00716.90
8.0.160.0040.00416.75
8.0.150.0000.00816.71
8.0.140.0040.00416.92
8.0.130.0060.00013.32
8.0.120.0000.00816.85
8.0.110.0070.00016.71
8.0.100.0050.00316.77
8.0.90.0000.00716.70
8.0.80.0070.01016.82
8.0.70.0000.00816.77
8.0.60.0000.00816.78
8.0.50.0000.00716.90
8.0.30.0110.00817.31
8.0.20.0140.00917.40
8.0.10.0080.00016.89
8.0.00.0080.01016.66
7.4.330.0030.00315.00
7.4.320.0060.00016.48
7.4.300.0060.00016.50
7.4.290.0030.00316.58
7.4.280.0000.00716.58
7.4.270.0030.00316.41
7.4.260.0070.00016.60
7.4.250.0000.00716.48
7.4.240.0030.00316.46
7.4.230.0030.00316.44
7.4.220.0160.01016.57
7.4.210.0060.00716.63
7.4.200.0000.00716.43
7.4.190.0070.00016.50
7.4.160.0080.00816.57
7.4.150.0100.00717.40
7.4.140.0110.00617.86
7.4.130.0100.00916.51
7.4.120.0140.00316.47
7.4.110.0080.00816.40
7.4.100.0070.01016.63
7.4.90.0090.00916.49
7.4.80.0060.01219.39
7.4.70.0090.00916.34
7.4.60.0100.00616.48
7.4.50.0000.00816.18
7.4.40.0030.01322.77
7.4.30.0060.00916.41
7.4.00.0100.00614.91
7.3.330.0030.00313.32
7.3.320.0050.00013.19
7.3.310.0030.00316.43
7.3.300.0000.00716.23
7.3.290.0090.00616.32
7.3.280.0080.00816.36
7.3.270.0070.01017.40
7.3.260.0170.00616.65
7.3.250.0130.00516.64
7.3.240.0040.01316.29
7.3.230.0120.00616.62
7.3.210.0100.00716.28
7.3.200.0140.00719.39
7.3.190.0140.00416.54
7.3.180.0060.00916.69
7.3.170.0090.00616.36
7.3.160.0120.00416.45
7.3.120.0070.01014.81
7.2.330.0100.00716.75
7.2.320.0110.00816.82
7.2.310.0060.01616.72
7.2.300.0070.01016.82
7.2.290.0060.01016.61
7.1.70.0000.00717.12
7.1.60.0100.01619.82
7.1.50.0070.01817.02
7.1.00.0100.06722.35
7.0.200.0100.00716.53
7.0.140.0100.06022.04
7.0.60.0100.07019.92
7.0.50.0000.06317.86
7.0.40.0170.07720.09
7.0.30.0300.08320.15
7.0.20.0300.05020.23
7.0.10.0170.04720.20
7.0.00.0170.07020.32
5.6.280.0070.07021.07
5.6.210.0100.07720.48
5.6.200.0070.07718.15
5.6.190.0130.08020.50
5.6.180.3500.04320.60
5.6.170.0270.08320.50
5.6.160.0130.07720.57
5.6.150.0100.07718.12
5.6.140.0030.04318.17
5.6.130.0130.06718.15
5.6.120.0030.07021.00
5.6.110.0000.09321.12
5.6.100.0130.07720.98
5.6.90.0000.04320.98
5.6.80.0000.04020.38
5.6.70.0170.03720.37
5.5.350.0000.05320.47
5.5.340.0000.04017.93
5.5.330.0100.03720.59
5.5.320.0230.08020.35
5.5.310.0100.04720.39
5.5.300.0000.04317.98
5.5.290.0000.04317.96
5.5.280.0070.03720.68
5.5.270.0100.08320.79
5.5.260.0070.08320.65
5.5.250.0100.07720.46
5.5.240.0030.07020.15
5.4.450.0930.07319.17
5.4.440.0670.05719.48
5.4.430.0630.05019.34
5.4.420.0130.06719.19
5.4.410.0900.05319.35
5.4.400.0700.05318.91
5.4.390.0300.05718.73
5.4.380.0200.05718.79
5.4.370.0130.05318.78
5.4.360.0170.06018.63
5.4.350.0230.04718.70
5.4.340.0230.04318.61
5.4.320.0040.03812.50
5.4.310.0110.04512.50
5.4.300.0080.03712.50
5.4.290.0120.03212.50
5.4.280.0070.03512.40
5.4.270.0070.04212.40
5.4.260.0070.05718.74
5.4.250.0000.05719.02
5.4.240.0100.04718.93
5.4.230.0070.05718.80
5.4.220.0170.04718.93
5.4.210.0070.05718.76
5.4.200.0100.08718.81
5.4.190.0100.05718.77
5.4.180.0130.07018.73
5.4.170.0030.07718.64
5.4.160.0100.07718.90
5.4.150.0170.07318.93
5.4.140.0130.06316.47
5.4.130.0000.07716.38
5.4.120.0030.06716.36
5.4.110.0030.06016.40
5.4.100.0070.05016.36
5.4.90.0130.04316.35
5.4.80.0030.07316.53
5.4.70.0100.05716.46
5.4.60.0100.06316.33
5.4.50.0100.06316.43
5.4.40.0170.05716.57
5.4.30.0070.05016.38
5.4.20.0070.05016.36
5.4.10.0200.05316.38
5.4.00.0170.04315.95
5.3.290.0080.03912.80
5.3.280.0070.05014.75
5.3.270.0070.06314.69
5.3.260.0070.05014.51
5.3.250.0100.07014.68
5.3.240.0070.05314.60
5.3.230.0030.06314.58
5.3.220.0100.04714.57
5.3.210.0070.05314.63
5.3.200.0030.05714.65
5.3.190.0030.05314.54
5.3.180.0030.07714.63
5.3.170.0170.06014.56
5.3.160.0030.06014.58
5.3.150.0030.05314.46
5.3.140.0030.07714.64
5.3.130.0030.06314.71
5.3.120.0100.07314.64
5.3.110.0000.06014.55
5.3.100.0070.05314.12
5.3.90.0100.07014.20
5.3.80.0170.05714.02
5.3.70.0130.04314.06
5.3.60.0070.05014.21
5.3.50.0070.07013.95
5.3.40.0130.06013.94
5.3.30.0030.05313.74
5.3.20.0030.05313.68
5.3.10.0130.05713.63
5.3.00.0000.05313.63
5.2.170.0000.05311.13
5.2.160.0070.04011.10
5.2.150.0100.04011.11
5.2.140.0030.04311.36
5.2.130.0070.05011.32
5.2.120.0030.04711.11
5.2.110.0070.03711.19
5.2.100.0100.05711.05
5.2.90.0070.05711.26
5.2.80.0030.04311.09
5.2.70.0070.04010.92
5.2.60.0070.04011.23
5.2.50.0070.04010.98
5.2.40.0100.05011.09
5.2.30.0100.05310.93
5.2.20.0030.06010.91
5.2.10.0070.03310.95
5.2.00.0070.03710.68
5.1.60.0070.0309.91
5.1.50.0100.03010.09
5.1.40.0030.0339.95
5.1.30.0000.04010.42
5.1.20.0000.04010.31
5.1.10.0030.03310.11
5.1.00.0100.02710.12
5.0.50.0030.0409.07
5.0.40.0030.0279.07
5.0.30.0000.0439.07
5.0.20.0030.0279.07
5.0.10.0030.0279.07
5.0.00.0030.0409.07
4.4.90.0070.0179.07
4.4.80.0030.0309.07
4.4.70.0070.0209.07
4.4.60.0030.0309.07
4.4.50.0070.0209.07
4.4.40.0030.0309.07
4.4.30.0000.0239.07
4.4.20.0030.0209.07
4.4.10.0030.0209.07
4.4.00.0000.0339.07
4.3.110.0000.0239.07
4.3.100.0030.0209.07
4.3.90.0030.0209.07
4.3.80.0000.0479.07
4.3.70.0100.0139.07
4.3.60.0100.0209.07
4.3.50.0070.0239.07
4.3.40.0070.0279.07
4.3.30.0000.0239.07
4.3.20.0070.0239.07
4.3.10.0000.0239.07
4.3.00.0070.0277.70

preferences:
42.07 ms | 401 KiB | 5 Q