3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { protected $_themeMap = array( "microsite" => array( "toc" => "microsite", "global-ui" => "microsite" ) ); public function getTOCFromTheme($theme) { if(array_key_exists($theme, $this->_themeMap) && array_key_exists("toc", $this->_themeMap[$theme])) { return $this->$_themeMap[$theme]["toc"]; } else { return "default"; } } } testClass = new TestClass; echo testClass->getTOCFromTheme('microsite'); ?>

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.4.260.0100.05319.02
5.4.250.0030.07718.84
5.4.240.0270.06319.04
5.4.230.0070.05719.05
5.4.220.0030.06018.79
5.4.210.0070.07318.76
5.4.200.0030.05718.77
5.4.190.0070.05318.99
5.4.180.0170.05018.74
5.4.170.0200.04018.89
5.4.160.0030.05318.98
5.4.150.0030.06018.64
5.4.140.0070.05016.41
5.4.130.0100.04316.54
5.4.120.0100.07016.59
5.4.110.0230.05316.61
5.4.100.0100.07016.47
5.4.90.0130.06716.67
5.4.80.0070.05316.53
5.4.70.0070.05016.52
5.4.60.0030.05316.47
5.4.50.0130.04316.40
5.4.40.0030.05016.58
5.4.30.0000.05316.50
5.4.20.0000.05716.48
5.4.10.0200.04016.38
5.4.00.0070.06715.81
5.3.280.0030.05314.60
5.3.270.0100.05314.59
5.3.260.0070.05314.67
5.3.250.0100.04714.68
5.3.240.0030.05014.63
5.3.230.0070.05014.59
5.3.220.0100.04714.59
5.3.210.0070.05314.56
5.3.200.0030.05014.55
5.3.190.0100.04714.75
5.3.180.0100.05014.59
5.3.170.0100.04714.64
5.3.160.0070.05314.70
5.3.150.0100.04714.76
5.3.140.0030.05014.71
5.3.130.0130.05014.63
5.3.120.0030.08014.73
5.3.110.0130.04314.61
5.3.100.0070.05714.17
5.3.90.0100.07014.17
5.3.80.0070.06714.02
5.3.70.0200.04714.02
5.3.60.0030.05013.97
5.3.50.0000.05313.95
5.3.40.0100.06714.01
5.3.30.0070.05013.74
5.3.20.0100.05013.77
5.3.10.0100.04313.74
5.3.00.0100.04313.82
5.2.170.0030.04311.21
5.2.160.0130.03311.23
5.2.150.0030.04311.05
5.2.140.0030.04711.04
5.2.130.0130.03311.19
5.2.120.0100.05311.18
5.2.110.0070.05311.08
5.2.100.0000.04311.18
5.2.90.0170.03011.17
5.2.80.0100.04711.05
5.2.70.0100.05711.15
5.2.60.0070.03711.27
5.2.50.0030.05311.11
5.2.40.0070.04011.09
5.2.30.0070.04011.13
5.2.20.0170.03011.05
5.2.10.0070.05711.08
5.2.00.0030.04310.70
5.1.60.0200.03010.06
5.1.50.0070.04310.06
5.1.40.0100.0409.90
5.1.30.0130.04010.51
5.1.20.0100.03010.42
5.1.10.0000.04010.26
5.1.00.0000.0379.98
5.0.50.0070.0238.61
5.0.40.0070.0308.45
5.0.30.0030.0608.14
5.0.20.0070.0278.28
5.0.10.0030.0408.09
5.0.00.0000.0438.23
4.4.90.0100.0136.25
4.4.80.0070.0206.25
4.4.70.0000.0236.25
4.4.60.0030.0206.25
4.4.50.0070.0276.25
4.4.40.0030.0436.25
4.4.30.0000.0336.25
4.4.20.0000.0236.25
4.4.10.0000.0236.25
4.4.00.0070.0406.25
4.3.110.0000.0276.25
4.3.100.0030.0206.25
4.3.90.0000.0236.25
4.3.80.0030.0376.25
4.3.70.0070.0176.25
4.3.60.0030.0206.25
4.3.50.0030.0206.25
4.3.40.0030.0306.25
4.3.30.0070.0176.25
4.3.20.0000.0236.25
4.3.10.0030.0206.25
4.3.00.0100.0236.63

preferences:
136.08 ms | 1398 KiB | 7 Q