3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ConfigManager { var $config = array(); function ConfigManager() { echo "Created\n"; } function load() { $this->config = array('foo' => 'bar'); } function get($key) { return isset($this->config[$key]) ? $this->config[$key] : null; } function set($key, $value) { $this->config[$key] = $value; } } function &config_get_manager() { static $configManager = null; if (!isset($configManager)) { $configManager = &new ConfigManager; $configManager->load(); } return $configManager; } function config_get($key) { static $configManager = null; if (!isset($configManager)) { $configManager = &config_get_manager(); } return $configManager->get($key); } function config_set($key, $value) { static $configManager = null; if (!isset($configManager)) { $configManager = &config_get_manager(); } $configManager->set($key, $value); } echo config_get('foo') . "\n"; config_set('foo', 'baz'); echo config_get('foo') . "\n";

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)
5.6.280.0070.07021.11
5.6.210.0400.05320.70
5.6.200.0030.07018.20
5.6.190.0030.08020.62
5.6.180.4070.04320.61
5.6.170.0230.04020.47
5.6.160.0030.05020.46
5.6.150.0100.03318.29
5.6.140.0170.07018.16
5.6.130.0070.07718.15
5.6.120.0030.05321.02
5.6.110.0030.06021.04
5.6.100.0130.08321.14
5.6.90.0100.06321.11
5.6.80.0070.05320.54
5.6.70.4470.04020.52
5.5.350.0130.07020.42
5.5.340.0000.04018.02
5.5.330.0100.06320.13
5.5.320.0270.03720.31
5.5.310.0170.04320.35
5.5.300.0000.05317.98
5.5.290.0200.06318.04
5.5.280.0100.03720.82
5.5.270.0100.06020.88
5.5.260.0070.08720.76
5.5.250.0030.04020.79
5.5.240.0130.07320.27
5.4.450.0400.06719.46
5.4.440.0570.06019.44
5.4.430.0200.06319.32
5.4.420.0500.06019.20
5.4.410.0170.04719.45
5.4.400.0800.00018.82
5.4.390.0800.00018.50
5.4.380.0200.07318.51
5.4.370.0300.04718.76
5.4.360.0300.04718.60
5.4.350.0270.05718.71
5.4.340.0330.06018.80
5.4.320.0080.03512.52
5.4.310.0050.03812.52
5.4.300.0040.03812.52
5.4.290.0080.04512.51
5.4.280.0060.03512.41
5.4.270.0050.03812.41
5.4.260.0100.07718.81
5.4.250.0170.04718.65
5.4.240.0130.05018.98
5.4.230.0030.05718.83
5.4.220.0100.05718.65
5.4.210.0130.05318.98
5.4.200.0070.05318.67
5.4.190.0070.06718.83
5.4.180.0170.06319.00
5.4.170.0100.06018.79
5.4.160.0070.06018.73
5.4.150.0070.06318.63
5.4.140.0130.07316.37
5.4.130.0070.06016.40
5.4.120.0100.07016.46
5.4.110.0070.05316.42
5.4.100.0100.05316.54
5.4.90.0100.05316.41
5.4.80.0130.04316.52
5.4.70.0130.05016.55
5.4.60.0170.06016.46
5.4.50.0100.07716.62
5.4.40.0100.04716.51
5.4.30.0170.04316.50
5.4.20.0070.07716.40
5.4.10.0170.05016.35
5.4.00.0170.06315.85
5.3.290.0090.03612.80
5.3.280.0100.07314.79
5.3.270.0170.07314.69
5.3.260.0100.05314.70
5.3.250.0100.05314.53
5.3.240.0200.05014.62
5.3.230.0130.06714.69
5.3.220.0100.05714.67
5.3.210.0070.08014.57
5.3.200.0200.04714.80
5.3.190.0100.04714.60
5.3.180.0030.06014.48
5.3.170.0200.06014.48
5.3.160.0100.05014.65
5.3.150.0130.04714.60
5.3.140.0070.05014.66
5.3.130.0100.05014.57
5.3.120.0170.04714.58
5.3.110.0100.05314.75
5.3.100.0130.04314.07
5.3.90.0000.07714.00
5.3.80.0030.07314.00
5.3.70.0100.06714.12
5.3.60.0170.04014.23
5.3.50.0030.05013.79
5.3.40.0100.05013.87
5.3.30.0170.04713.94
5.3.20.0200.03713.72
5.3.10.0030.06713.63
5.3.00.0070.06713.62
5.2.170.0100.03711.32
5.2.160.0100.05011.32
5.2.150.0070.06011.14
5.2.140.0100.05311.22
5.2.130.0130.05011.20
5.2.120.0100.05011.28
5.2.110.0100.05311.11
5.2.100.0100.03711.10
5.2.90.0170.05011.22
5.2.80.0200.04711.19
5.2.70.0030.04311.09
5.2.60.0100.03711.29
5.2.50.0130.03011.13
5.2.40.0070.03711.10
5.2.30.0100.03711.06
5.2.20.0070.03711.06
5.2.10.0170.04010.70
5.2.00.0100.04010.81
5.1.60.0130.04010.25
5.1.50.0070.03310.08
5.1.40.0100.03010.00
5.1.30.0030.03710.42
5.1.20.0070.03310.34
5.1.10.0030.04710.13
5.1.00.0030.03710.14
5.0.50.0030.0278.51
5.0.40.0070.0378.67
5.0.30.0100.0538.23
5.0.20.0070.0278.20
5.0.10.0070.0278.25
5.0.00.0030.0478.27
4.4.90.0070.0176.58
4.4.80.0000.0236.58
4.4.70.0070.0176.58
4.4.60.0030.0206.58
4.4.50.0000.0336.58
4.4.40.0030.0336.58
4.4.30.0130.0206.58
4.4.20.0000.0236.58
4.4.10.0000.0236.58
4.4.00.0070.0406.58
4.3.110.0000.0306.58
4.3.100.0070.0306.58
4.3.90.0000.0306.58
4.3.80.0070.0306.58
4.3.70.0030.0206.58
4.3.60.0030.0206.58
4.3.50.0030.0306.58
4.3.40.0000.0376.58
4.3.30.0030.0206.58
4.3.20.0070.0176.58
4.3.10.0030.0206.58
4.3.00.0100.0237.38

preferences:
144.59 ms | 1394 KiB | 7 Q