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] = array(); $$lName[$key] = $value; print_r($$lName[0][ID]); } 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.0150.00018.61
8.3.50.0030.01716.49
8.3.40.0040.01118.82
8.3.30.0070.00719.17
8.3.20.0050.00220.16
8.3.10.0040.00421.97
8.3.00.0070.00020.82
8.2.180.0150.00016.75
8.2.170.0110.00722.96
8.2.160.0170.00019.09
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0060.00326.16
8.2.120.0040.00419.48
8.2.110.0040.00420.41
8.2.100.0040.00718.22
8.2.90.0000.00819.34
8.2.80.0000.00917.97
8.2.70.0090.00017.75
8.2.60.0000.00818.05
8.2.50.0040.00418.07
8.2.40.0040.00418.34
8.2.30.0070.00018.01
8.2.20.0000.00717.82
8.2.10.0060.00317.78
8.2.00.0030.00517.80
8.1.270.0040.00422.09
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.66
8.1.230.0070.00419.00
8.1.220.0080.00017.78
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0060.00317.66
8.1.180.0040.00418.93
8.1.170.0000.00818.57
8.1.160.0000.00722.20
8.1.150.0000.00718.52
8.1.140.0000.00817.36
8.1.130.0000.00717.82
8.1.120.0040.00317.54
8.1.110.0000.00817.38
8.1.100.0050.00217.37
8.1.90.0000.00817.35
8.1.80.0000.00717.52
8.1.70.0000.00717.44
8.1.60.0030.00617.62
8.1.50.0030.00517.52
8.1.40.0040.00417.51
8.1.30.0070.00017.64
8.1.20.0000.00817.69
8.1.10.0040.00417.48
8.1.00.0030.00517.47
8.0.300.0000.00818.77
8.0.290.0040.00417.05
8.0.280.0000.00718.32
8.0.270.0070.00017.17
8.0.260.0000.00616.80
8.0.250.0030.00316.94
8.0.240.0040.00417.05
8.0.230.0030.00317.01
8.0.220.0040.00416.89
8.0.210.0050.00316.93
8.0.200.0070.00016.95
8.0.190.0020.00517.02
8.0.180.0050.00316.91
8.0.170.0050.00316.95
8.0.160.0000.00917.05
8.0.150.0030.00316.86
8.0.140.0000.00716.95
8.0.130.0080.00013.38
8.0.120.0000.00816.81
8.0.110.0060.00316.91
8.0.100.0040.00417.00
8.0.90.0000.00716.91
8.0.80.0090.01216.88
8.0.70.0040.00416.82
8.0.60.0040.00416.98
8.0.50.0050.00316.82
8.0.30.0140.00517.16
8.0.20.0050.01417.40
8.0.10.0040.00417.03
8.0.00.0110.00616.90
7.4.330.0020.00215.00
7.4.320.0030.00316.49
7.4.300.0070.00016.59
7.4.290.0030.00316.41
7.4.280.0000.00716.43
7.4.270.0000.00716.58
7.4.260.0030.00616.48
7.4.250.0000.00716.54
7.4.240.0020.00516.54
7.4.230.0030.00316.42
7.4.220.0070.01716.59
7.4.210.0100.00616.58
7.4.200.0000.00716.58
7.4.190.0080.00016.50
7.4.160.0070.01016.32
7.4.150.0130.00517.40
7.4.140.0100.00817.86
7.4.130.0090.00916.48
7.4.120.0120.00516.48
7.4.110.0070.01016.61
7.4.100.0150.00316.49
7.4.90.0180.00616.72
7.4.80.0130.01019.39
7.4.70.0060.01216.67
7.4.60.0120.00316.43
7.4.50.0050.00316.52
7.4.40.0070.01022.77
7.4.30.0170.00016.66
7.4.00.0100.00714.97
7.3.330.0000.00513.43
7.3.320.0050.00013.41
7.3.310.0000.00716.32
7.3.300.0030.00316.43
7.3.290.0090.00616.43
7.3.280.0080.00916.46
7.3.270.0090.00917.40
7.3.260.0070.01016.76
7.3.250.0140.00816.49
7.3.240.0030.01316.39
7.3.230.0030.01516.47
7.3.210.0150.00316.43
7.3.200.0090.00619.39
7.3.190.0100.00716.53
7.3.180.0150.00016.41
7.3.170.0070.01016.64
7.3.160.0030.01316.29
7.3.120.0070.01014.56
7.2.330.0070.01416.62
7.2.320.0110.00716.77
7.2.310.0170.00316.70
7.2.300.0090.00916.80
7.2.290.0080.00816.58
7.2.60.0100.00016.96
7.2.00.0130.00319.55
7.1.200.0030.00615.90
7.1.100.0070.00718.32
7.1.70.0040.01217.03
7.1.60.0120.01219.82
7.1.50.0060.01016.99
7.1.00.0170.05022.41
7.0.200.0030.00616.61
7.0.140.0070.06322.11
7.0.60.0070.07320.04
7.0.50.0030.04317.82
7.0.40.0070.05320.02
7.0.30.0270.04720.25
7.0.20.0400.06720.16
7.0.10.0100.06020.07
7.0.00.0030.09020.09
5.6.280.0000.07720.90
5.6.210.0070.07720.48
5.6.200.0100.04318.19
5.6.190.0070.07720.49
5.6.180.3330.03320.77
5.6.170.0400.06720.50
5.6.160.0070.08320.49
5.6.150.0070.06018.25
5.6.140.0100.03718.21
5.6.130.0070.08018.14
5.6.120.0070.05321.04
5.6.110.0030.08721.02
5.6.100.0130.07021.05
5.6.90.0000.04321.10
5.6.80.0030.04020.34
5.6.70.0200.06320.51
5.5.350.0070.06720.39
5.5.340.0070.03717.98
5.5.330.0000.04720.40
5.5.320.0270.06720.29
5.5.310.0100.04320.34
5.5.300.0070.08017.98
5.5.290.0000.04317.98
5.5.280.0100.04020.80
5.5.270.0070.09020.87
5.5.260.0100.08720.68
5.5.250.0070.07320.71
5.5.240.0030.04720.16
5.4.450.0730.06019.61
5.4.440.0630.06019.16
5.4.430.0630.06319.58
5.4.420.0900.04319.55
5.4.410.0730.05319.32
5.4.400.0230.05318.52
5.4.390.0300.05318.53
5.4.380.0170.05718.56
5.4.370.0100.05718.52
5.4.360.0200.05018.62
5.4.350.0270.04318.56
5.4.340.0100.06018.46
5.4.320.0090.03812.50
5.4.310.0070.03712.50
5.4.300.0050.04512.50
5.4.290.0050.04312.50
5.4.280.0060.04212.40
5.4.270.0050.03812.40
5.4.260.0130.04718.90
5.4.250.0070.05318.80
5.4.240.0130.05318.89
5.4.230.0100.05018.65
5.4.220.0100.05319.01
5.4.210.0030.06719.08
5.4.200.0100.05718.80
5.4.190.0200.04718.84
5.4.180.0000.06318.98
5.4.170.0070.07018.93
5.4.160.0030.07318.72
5.4.150.0130.07718.87
5.4.140.0170.06016.39
5.4.130.0000.07316.38
5.4.120.0000.05716.58
5.4.110.0070.05716.71
5.4.100.0130.04716.30
5.4.90.0070.06316.54
5.4.80.0070.04716.62
5.4.70.0000.07016.55
5.4.60.0100.04316.44
5.4.50.0030.05016.48
5.4.40.0100.04316.57
5.4.30.0200.04716.59
5.4.20.0170.04016.32
5.4.10.0000.06016.43
5.4.00.0000.05015.83
5.3.290.0070.05012.80
5.3.280.0070.05014.52
5.3.270.0170.06714.59
5.3.260.0030.05714.43
5.3.250.0000.06714.69
5.3.240.0300.05714.68
5.3.230.0130.05314.42
5.3.220.0130.06314.39
5.3.210.0100.05314.53
5.3.200.0100.04314.74
5.3.190.0130.04314.53
5.3.180.0130.04314.70
5.3.170.0030.05714.53
5.3.160.0070.05014.64
5.3.150.0030.05314.64
5.3.140.0000.06014.46
5.3.130.0070.07014.64
5.3.120.0000.06714.51
5.3.110.0100.04714.68
5.3.100.0030.05014.12
5.3.90.0030.05313.85
5.3.80.0070.05013.92
5.3.70.0070.06314.09
5.3.60.0070.04714.16
5.3.50.0170.05314.11
5.3.40.0100.05313.94
5.3.30.0100.05013.97
5.3.20.0070.04313.77
5.3.10.0100.04013.80
5.3.00.0030.05013.68
5.2.170.0000.04710.98
5.2.160.0030.06011.23
5.2.150.0000.04311.21
5.2.140.0030.04011.13
5.2.130.0000.04311.08
5.2.120.0030.04011.09
5.2.110.0070.03711.09
5.2.100.0070.03311.16
5.2.90.0100.03311.00
5.2.80.0030.04711.25
5.2.70.0030.06011.16
5.2.60.0030.04011.04
5.2.50.0070.05711.00
5.2.40.0030.04011.00
5.2.30.0030.06011.07
5.2.20.0030.04711.18
5.2.10.0070.03311.04
5.2.00.0030.03710.80
5.1.60.0000.03710.04
5.1.50.0070.0309.96
5.1.40.0100.0339.94
5.1.30.0000.03710.30
5.1.20.0030.03310.26
5.1.10.0000.03710.22
5.1.00.0030.04710.13
5.0.50.0000.0409.07
5.0.40.0000.0279.07
5.0.30.0030.0479.07
5.0.20.0000.0309.07
5.0.10.0030.0409.07
5.0.00.0000.0479.07
4.4.90.0130.0209.07
4.4.80.0000.0239.07
4.4.70.0000.0309.07
4.4.60.0000.0209.07
4.4.50.0000.0209.07
4.4.40.0100.0339.07
4.4.30.0030.0179.07
4.4.20.0030.0209.07
4.4.10.0000.0209.07
4.4.00.0000.0339.07
4.3.110.0000.0239.07
4.3.100.0070.0239.07
4.3.90.0030.0209.07
4.3.80.0000.0409.07
4.3.70.0000.0209.07
4.3.60.0000.0209.07
4.3.50.0030.0179.07
4.3.40.0030.0439.07
4.3.30.0030.0209.07
4.3.20.0000.0239.07
4.3.10.0030.0209.07
4.3.00.0130.0277.70

preferences:
47.09 ms | 400 KiB | 5 Q