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);echo $lName; $$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.0180.00318.45
8.3.50.0070.00721.09
8.3.40.0110.00318.86
8.3.30.0120.00918.96
8.3.20.0050.00220.20
8.3.10.0080.00022.09
8.3.00.0100.00320.68
8.2.180.0140.00416.75
8.2.170.0130.00322.96
8.2.160.0140.00019.15
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.01526.16
8.2.120.0050.00319.49
8.2.110.0070.00321.12
8.2.100.0110.00019.23
8.2.90.0030.00519.17
8.2.80.0050.00317.97
8.2.70.0000.00817.73
8.2.60.0090.00018.05
8.2.50.0040.00418.07
8.2.40.0080.00018.28
8.2.30.0000.00718.10
8.2.20.0050.00317.68
8.2.10.0040.00417.69
8.2.00.0040.00417.86
8.1.280.0090.00925.92
8.1.270.0040.00421.90
8.1.260.0030.00626.35
8.1.250.0080.00028.09
8.1.240.0070.00419.21
8.1.230.0080.00419.14
8.1.220.0050.00317.74
8.1.210.0090.00018.77
8.1.200.0000.01017.35
8.1.190.0050.00317.42
8.1.180.0040.00418.73
8.1.170.0060.00318.50
8.1.160.0000.00722.04
8.1.150.0090.00018.54
8.1.140.0000.00817.45
8.1.130.0030.00317.76
8.1.120.0000.00817.47
8.1.110.0040.00417.44
8.1.100.0040.00417.30
8.1.90.0000.00817.43
8.1.80.0040.00417.52
8.1.70.0070.00017.46
8.1.60.0030.00617.43
8.1.50.0000.00817.41
8.1.40.0080.00017.41
8.1.30.0000.00717.52
8.1.20.0000.00917.63
8.1.10.0060.00317.56
8.1.00.0050.00217.38
8.0.300.0030.00618.77
8.0.290.0040.00417.18
8.0.280.0040.00418.36
8.0.270.0030.00317.26
8.0.260.0000.00716.88
8.0.250.0000.00717.06
8.0.240.0000.00716.95
8.0.230.0000.00716.91
8.0.220.0040.00416.84
8.0.210.0040.00416.91
8.0.200.0070.00017.06
8.0.190.0040.00416.96
8.0.180.0040.00416.96
8.0.170.0040.00416.89
8.0.160.0040.00416.91
8.0.150.0040.00416.91
8.0.140.0000.00816.93
8.0.130.0000.00513.40
8.0.120.0040.00416.83
8.0.110.0050.00316.80
8.0.100.0000.00716.88
8.0.90.0070.00016.82
8.0.80.0130.00316.89
8.0.70.0000.00816.98
8.0.60.0040.00417.02
8.0.50.0040.00416.82
8.0.30.0090.01117.30
8.0.20.0110.00817.40
8.0.10.0050.00316.91
8.0.00.0080.01216.82
7.4.330.0000.00515.00
7.4.320.0000.00616.50
7.4.300.0070.00016.57
7.4.290.0050.00216.57
7.4.280.0050.00316.59
7.4.270.0000.00716.46
7.4.260.0060.00316.46
7.4.250.0040.00416.59
7.4.240.0040.00416.55
7.4.230.0030.00316.40
7.4.220.0110.00716.63
7.4.210.0090.00816.62
7.4.200.0030.00316.39
7.4.190.0040.00416.46
7.4.160.0080.00816.38
7.4.150.0100.00717.40
7.4.140.0100.01017.86
7.4.130.0130.00816.49
7.4.120.0110.00616.63
7.4.110.0100.01316.53
7.4.100.0070.01316.58
7.4.90.0110.00716.52
7.4.80.0150.00619.39
7.4.70.0090.00916.66
7.4.60.0060.01416.47
7.4.50.0040.00416.61
7.4.40.0080.00422.77
7.4.30.0110.00516.56
7.4.00.0040.01215.22
7.3.330.0030.00313.27
7.3.320.0050.00013.25
7.3.310.0030.00316.41
7.3.300.0030.00316.43
7.3.290.0070.00716.45
7.3.280.0060.01216.43
7.3.270.0120.00617.40
7.3.260.0120.00616.41
7.3.250.0100.00716.62
7.3.240.0100.00616.51
7.3.230.0100.00716.45
7.3.210.0100.01016.35
7.3.200.0030.01319.39
7.3.190.0080.01416.43
7.3.180.0090.00616.75
7.3.170.0080.00816.55
7.3.160.0090.00816.45
7.3.120.0090.00614.83
7.2.330.0090.01016.71
7.2.320.0080.00816.56
7.2.310.0090.00916.67
7.2.300.0090.00616.73
7.2.290.0030.01416.78
7.1.70.0040.01417.24
7.1.60.0140.01019.82
7.1.50.0080.00417.11
7.1.00.0030.06022.31
7.0.200.0000.00716.68
7.0.140.0000.07721.92
7.0.110.0530.04319.95
7.0.100.0200.04720.00
7.0.90.0300.06719.87
7.0.80.0400.03019.89
7.0.70.0370.06319.91
7.0.60.0130.04020.08
7.0.50.0300.07020.09
7.0.40.0070.04019.79
7.0.30.0030.07319.83
7.0.20.0100.03719.68
7.0.10.0030.03719.78
7.0.00.0030.05719.72
5.6.280.0030.07321.08
5.6.260.0070.07020.72
5.6.250.0070.04020.66
5.6.240.0100.05020.72
5.6.230.0030.04020.71
5.6.220.0030.04020.55
5.6.210.0100.03320.68
5.6.200.0070.03720.64
5.6.190.0100.07020.66
5.6.180.0070.03720.63
5.6.170.0070.05720.69
5.6.160.0000.07020.60
5.6.150.0000.05720.59
5.6.140.0100.07720.60
5.6.130.0030.06320.65
5.6.120.0030.08720.59
5.6.110.0100.07020.61
5.6.100.0170.07020.53
5.6.90.0130.07020.68
5.6.80.0070.07319.95
5.6.70.0030.04020.07
5.6.60.0030.04019.84
5.6.50.0030.04020.08
5.6.40.0130.06019.99
5.6.30.0000.04019.91
5.6.20.0000.04319.92
5.6.10.0030.04019.96
5.6.00.0070.07319.99
5.5.380.0100.05317.52
5.5.370.0000.07017.51
5.5.360.0170.03317.48
5.5.350.0070.07317.65
5.5.340.0070.07018.13
5.5.330.0100.07318.12
5.5.320.0070.05018.22
5.5.310.0070.05017.83
5.5.300.0200.02317.91
5.5.290.0070.07018.23
5.5.280.0030.06018.12
5.5.270.0000.05718.11
5.5.260.0000.07318.10
5.5.250.0070.04017.95
5.5.240.0100.06317.30
5.5.230.0070.06317.21
5.5.220.0030.06017.43
5.5.210.0100.03017.31
5.5.200.0030.03717.30
5.5.190.0070.03717.40
5.5.180.0070.03317.58
5.5.160.0070.07317.28
5.5.150.0070.03317.31
5.5.140.0100.07317.44
5.5.130.0000.04717.28
5.5.120.0000.04017.60
5.5.110.0070.03317.43
5.5.100.0030.04317.32
5.5.90.0070.03317.38
5.5.80.0030.03717.20
5.5.70.0070.03317.15
5.5.60.0030.03717.47
5.5.50.0030.04017.36
5.5.40.0000.04017.16
5.5.30.0130.03017.36
5.5.20.0030.05017.15
5.5.10.0030.04017.20
5.5.00.0030.03717.16
5.4.450.0070.06019.32
5.4.440.0070.06319.33
5.4.430.0070.05719.57
5.4.420.0030.04019.63
5.4.410.0100.07019.19
5.4.400.0070.03319.17
5.4.390.0070.07019.18
5.4.380.0070.03319.34
5.4.370.0030.07719.17
5.4.360.0000.04019.04
5.4.350.0100.07019.01
5.4.340.0030.07719.09
5.4.320.0000.05018.95
5.4.310.0030.07018.95
5.4.300.0130.05319.03
5.4.290.0000.05719.13
5.4.280.0030.03719.01
5.4.270.0030.06319.00
5.4.260.0100.05719.24
5.4.250.0130.04319.01
5.4.240.0030.03719.02
5.4.230.0100.06319.02
5.4.220.0100.06019.02
5.4.210.0100.05319.01
5.4.200.0070.04718.98
5.4.190.0000.03319.30
5.4.180.0000.04019.18
5.4.170.0030.03719.18
5.4.160.0030.04019.32
5.4.150.0030.03319.32
5.4.140.0030.03016.29
5.4.130.0000.04016.33
5.4.120.0030.03016.50
5.4.110.0070.02716.32
5.4.100.0030.03316.41
5.4.90.0070.02716.41
5.4.80.0070.03316.40
5.4.70.0070.03016.55
5.4.60.0070.03016.39
5.4.50.0030.03716.49
5.4.40.0000.03316.49
5.4.30.0030.03716.52
5.4.20.0000.03716.28
5.4.10.0000.03316.51
5.4.00.0070.03015.80
5.3.290.0070.07014.79
5.3.280.0070.07714.45
5.3.270.0030.04014.73
5.3.260.0000.04014.60
5.3.250.0030.03714.83
5.3.240.0070.03014.75
5.3.230.0070.03014.67
5.3.220.0000.03314.56
5.3.210.0030.03314.70
5.3.200.0030.03714.56
5.3.190.0030.03714.70
5.3.180.0030.03014.69
5.3.170.0070.03314.55
5.3.160.0030.03014.55
5.3.150.0070.03314.59
5.3.140.0000.04014.53
5.3.130.0000.04014.55
5.3.120.0030.03314.55
5.3.110.0000.03314.55
5.3.100.0030.03014.05
5.3.90.0070.02714.07
5.3.80.0070.03014.25
5.3.70.0000.03314.15
5.3.60.0070.02714.07
5.3.50.0030.03013.97
5.3.40.0030.03014.09
5.3.30.0030.03013.91
5.3.20.0000.03313.79
5.3.10.0030.06313.66
5.3.00.0100.05013.61
5.2.170.0000.02711.13
5.2.160.0030.02311.16
5.2.150.0030.02311.30
5.2.140.0000.02711.15
5.2.130.0070.02311.23
5.2.120.0030.03711.07
5.2.110.0070.03311.18
5.2.100.0100.02011.18
5.2.90.0070.02011.06
5.2.80.0070.02011.06
5.2.70.0030.05711.09
5.2.60.0000.03011.05
5.2.50.0030.02711.15
5.2.40.0030.06310.98
5.2.30.0030.02711.05
5.2.20.0070.04710.95
5.2.10.0070.06010.94
5.2.00.0130.01710.73
5.1.60.0000.03310.25
5.1.50.0030.05010.18
5.1.40.0000.02310.15
5.1.30.0070.03310.47
5.1.20.0030.02010.58
5.1.10.0100.04710.06
5.1.00.0070.05010.13
5.0.50.0030.0379.29
5.0.40.0030.0339.29
5.0.30.0100.0409.29
5.0.20.0070.0409.29
5.0.10.0030.0209.29
5.0.00.0000.0309.29
4.4.90.0000.0139.29
4.4.80.0000.0379.29
4.4.70.0000.0179.29
4.4.60.0030.0139.29
4.4.50.0000.0239.29
4.4.40.0030.0439.29
4.4.30.0070.0279.29
4.4.20.0000.0139.29
4.4.10.0070.0239.29
4.4.00.0030.0279.29
4.3.110.0000.0239.29
4.3.100.0030.0209.29
4.3.90.0030.0139.29
4.3.80.0030.0339.29
4.3.70.0070.0309.29
4.3.60.0000.0239.29
4.3.50.0070.0109.29
4.3.40.0030.0279.29
4.3.30.0000.0179.29
4.3.20.0000.0179.29
4.3.10.0000.0209.29
4.3.00.0000.0339.29

preferences:
39.27 ms | 401 KiB | 5 Q