3v4l.org

run code in 300+ PHP versions simultaneously
<?php class t { private static $configs = ["a" => ["b" => "c"]]; public static function set($name, $value) { $keyParts = explode(".", $name); $config =& self::$configs; while (!empty($keyParts)) { $key = array_shift($keyParts); if (!isset($config[$key])) { $config[$key] = []; } if (empty($keyParts)) { $config[$key] = $value; return; } $tconfig =& $config[$key]; $config = $tconfig; } } } t::set("a.b", "vittu");

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.0070.00718.31
8.3.50.0130.00721.87
8.3.40.0150.00018.89
8.3.30.0070.01119.13
8.3.20.0050.00320.16
8.3.10.0050.00323.68
8.3.00.0080.00019.08
8.2.180.0120.00618.41
8.2.170.0030.01022.96
8.2.160.0120.00622.03
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00420.98
8.2.110.0090.00022.34
8.2.100.0000.01117.72
8.2.90.0030.00517.75
8.2.80.0040.00418.81
8.2.70.0000.00818.03
8.2.60.0060.00318.34
8.2.50.0050.00318.10
8.2.40.0050.00319.27
8.2.30.0040.00419.21
8.2.20.0040.00417.73
8.2.10.0050.00218.05
8.2.00.0000.00717.64
8.1.280.0070.00725.92
8.1.270.0040.00419.03
8.1.260.0050.00226.35
8.1.250.0080.00028.09
8.1.240.0040.00423.83
8.1.230.0070.00421.04
8.1.220.0030.00617.78
8.1.210.0030.00518.77
8.1.200.0000.00917.25
8.1.190.0040.00417.36
8.1.180.0030.00519.02
8.1.170.0050.00318.62
8.1.160.0040.00419.00
8.1.150.0040.00418.88
8.1.140.0070.00017.44
8.1.130.0030.00517.88
8.1.120.0000.00717.43
8.1.110.0070.00017.44
8.1.100.0000.00717.29
8.1.90.0080.00017.44
8.1.80.0030.00317.50
8.1.70.0040.00417.46
8.1.60.0000.00817.56
8.1.50.0050.00317.54
8.1.40.0040.00417.50
8.1.30.0000.00817.54
8.1.20.0000.00817.53
8.1.10.0050.00317.54
8.1.00.0040.00417.42
8.0.300.0030.00518.77
8.0.290.0050.00216.75
8.0.280.0070.00018.43
8.0.270.0000.00817.26
8.0.260.0030.00517.12
8.0.250.0000.00716.98
8.0.240.0030.00316.81
8.0.230.0000.00716.93
8.0.220.0040.00416.92
8.0.210.0080.00016.88
8.0.200.0000.00716.95
8.0.190.0030.00516.82
8.0.180.0030.00316.79
8.0.170.0000.00716.90
8.0.160.0080.00016.80
8.0.150.0030.00616.93
8.0.140.0000.00716.88
8.0.130.0000.00613.32
8.0.120.0040.00416.86
8.0.110.0000.00816.82
8.0.100.0040.00416.67
8.0.90.0070.00016.70
8.0.80.0060.01516.81
8.0.70.0040.00416.98
8.0.60.0040.00416.90
8.0.50.0040.00416.81
8.0.30.0130.01017.17
8.0.20.0130.00717.40
8.0.10.0040.00416.94
8.0.00.0100.00916.85
7.4.330.0050.00015.03
7.4.320.0000.00616.41
7.4.300.0000.00716.44
7.4.290.0000.00816.54
7.4.280.0040.00416.50
7.4.270.0000.00716.52
7.4.260.0030.00316.48
7.4.250.0030.00316.45
7.4.240.0000.00716.61
7.4.230.0070.00016.38
7.4.220.0030.01416.50
7.4.210.0130.01016.68
7.4.200.0030.00316.39
7.4.160.0080.00816.44
7.4.150.0190.00317.40
7.4.140.0110.01017.86
7.4.130.0130.00716.37
7.4.120.0090.00816.52
7.4.110.0110.01416.44
7.4.100.0130.00716.68
7.4.90.0110.00716.50
7.4.80.0070.01119.39
7.4.70.0130.01016.53
7.4.60.0090.00616.39
7.4.50.0060.00316.30
7.4.40.0130.00316.16
7.4.30.0060.00916.44
7.4.00.0080.00815.04
7.3.330.0060.00013.38
7.3.320.0000.00513.21
7.3.310.0060.00316.21
7.3.300.0030.00316.30
7.3.290.0090.00416.35
7.3.280.0100.00716.40
7.3.270.0070.01017.40
7.3.260.0070.01016.34
7.3.250.0110.00616.41
7.3.240.0130.00316.47
7.3.230.0030.01716.61
7.3.210.0100.00716.52
7.3.200.0040.01219.39
7.3.190.0060.00916.39
7.3.180.0080.00816.30
7.3.170.0160.00616.55
7.3.160.0120.00416.30
7.2.330.0220.02816.41
7.2.320.0030.01416.66
7.2.310.0030.01716.83
7.2.300.0120.00416.81
7.2.290.0100.01316.61
7.2.60.0080.00816.92
7.2.00.0160.00618.70
7.1.200.0100.00315.54
7.1.100.0650.00316.00
7.1.70.0050.00217.04
7.1.60.0070.01419.22
7.1.50.0000.01016.96
7.1.00.0030.07322.30
7.0.200.0000.00816.69
7.0.140.0030.06321.95
7.0.60.0200.06719.98
7.0.50.0030.04017.87
7.0.40.0030.05320.13
7.0.30.0270.07020.07
7.0.20.0200.04320.10
7.0.10.0100.08320.26
7.0.00.0070.04320.06
5.6.280.0000.07721.04
5.6.210.0130.06320.73
5.6.200.0070.05318.27
5.6.190.0130.04020.55
5.6.180.0270.04320.60
5.6.170.0200.04720.51
5.6.160.0000.04320.47
5.6.150.0200.06718.29
5.6.140.0030.06718.18
5.6.130.0030.04318.25
5.6.120.0130.05021.00
5.6.110.0200.05721.12
5.6.100.0070.04020.98
5.6.90.0130.07720.99
5.6.80.0170.06320.43
5.5.350.0100.03320.40
5.5.340.0030.07717.93
5.5.330.0070.04320.44
5.5.320.0330.05720.35
5.5.310.0400.05720.29
5.5.300.0000.08718.08
5.5.290.0100.07717.95
5.5.280.0100.04020.88
5.5.270.0070.08720.84
5.5.260.0030.09720.73
5.5.250.0130.08020.69
5.5.240.0100.04020.07
5.4.450.0470.06019.62
5.4.440.0170.05719.48
5.4.430.0170.05319.39
5.4.420.0200.05019.57
5.4.410.0200.05019.45
5.4.400.0200.04719.27
5.4.390.0170.05318.72
5.4.380.0230.05318.64
5.4.370.0200.04718.77
5.4.360.0070.05718.73
5.4.350.0130.05718.72
5.4.340.0130.05718.78
5.4.320.0170.05318.72
5.4.310.0200.05018.68
5.4.300.0130.05318.66
5.4.290.0100.05718.50
5.4.280.0170.05318.75
5.4.270.0170.05018.79
5.4.260.0130.05318.70
5.4.250.0230.05018.63
5.4.240.0170.07018.69
5.4.230.0200.04718.78
5.4.220.0170.06318.52
5.4.210.0200.06718.60
5.4.200.0170.04716.53
5.4.190.0200.04718.76
5.4.180.0070.06318.69
5.4.170.0170.05718.82
5.4.160.0130.05718.69
5.4.150.0200.05018.44
5.4.140.0100.05716.27
5.4.130.0070.05716.18
5.4.120.0130.05316.27
5.4.110.0130.05016.27
5.4.100.0070.06316.45
5.4.90.0130.05316.28
5.4.80.0100.05316.30
5.4.70.0130.05316.27
5.4.60.0130.05316.41
5.4.50.0170.05016.15
5.4.40.0230.04716.20
5.4.30.0070.06016.26
5.4.20.0170.06016.40
5.4.10.0230.04316.25
5.4.00.0230.04315.67
5.3.290.0230.04714.79
5.3.280.0270.04314.56
5.3.270.0170.05314.63
5.3.260.0130.06014.77
5.3.250.0170.05314.63
5.3.240.0200.04714.64
5.3.230.0200.05014.72
5.3.220.0170.05014.61
5.3.210.0200.04714.60
5.3.200.0170.05714.68
5.3.190.0300.04314.60
5.3.180.0170.05014.76
5.3.170.0200.04714.69
5.3.160.0100.06014.54
5.3.150.0170.05014.57
5.3.140.0170.05014.59
5.3.130.0130.06014.57
5.3.120.0200.05014.55
5.3.110.0130.05714.53
5.3.100.0100.05714.16
5.3.90.0130.05014.05
5.3.80.0200.04714.00
5.3.70.0130.05314.04
5.3.60.0200.04714.05
5.3.50.0170.05314.14
5.3.40.0130.05314.01
5.3.30.0130.05013.96
5.3.20.0200.04713.75
5.3.10.0100.05313.67
5.3.00.0130.05013.74
5.2.170.0100.04311.36
5.2.160.0100.04311.37
5.2.150.0200.03711.27
5.2.140.0130.04011.26
5.2.130.0130.04011.20
5.2.120.0230.03011.14
5.2.110.0230.03711.15
5.2.100.0100.04311.21
5.2.90.0100.04311.20
5.2.80.0100.04711.19
5.2.70.0100.04711.22
5.2.60.0130.04011.09
5.2.50.0200.04011.08
5.2.40.0070.04311.09
5.2.30.0200.03310.99
5.2.20.0100.04011.06
5.2.10.0070.04010.96
5.2.00.0200.03010.84
5.1.60.0100.03310.16
5.1.50.0100.03310.03
5.1.40.0130.03310.01
5.1.30.0100.03310.33
5.1.20.0270.02010.55
5.1.10.0100.04010.26
5.1.00.0100.03710.20
5.0.50.0070.0278.61
5.0.40.0030.0308.61
5.0.30.0070.0438.30
5.0.20.0070.0278.22
5.0.10.0070.0278.38
5.0.00.0070.0438.36
4.4.90.0070.0205.94
4.4.80.0070.0235.96
4.4.70.0000.0275.87
4.4.60.0030.0235.96
4.4.50.0030.0235.93
4.4.40.0030.0375.98
4.4.30.0030.0275.92
4.4.20.0130.0175.95
4.4.10.0030.0235.98
4.4.00.0030.0375.89
4.3.110.0070.0235.90
4.3.100.0030.0235.86
4.3.90.0070.0205.82
4.3.80.0030.0375.82
4.3.70.0030.0205.78
4.3.60.0030.0235.82
4.3.50.0070.0235.77
4.3.40.0030.0335.88
4.3.30.0030.0204.54
4.3.20.0070.0204.62
4.3.10.0100.0174.47
4.3.00.0100.0307.30

preferences:
53.96 ms | 401 KiB | 5 Q