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 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.0200.04718.93
5.4.250.0170.05018.96
5.4.240.0130.06718.93
5.4.230.0170.06318.74
5.4.220.0200.06319.00
5.4.210.0170.05718.79
5.4.200.0030.07718.65
5.4.190.0070.05318.74
5.4.180.0130.07318.64
5.4.170.0100.07318.95
5.4.160.0170.05318.82
5.4.150.0100.05018.64
5.4.140.0070.05316.61
5.4.130.0100.06716.60
5.4.120.0130.05016.52
5.4.110.0070.06716.61
5.4.100.0130.06316.42
5.4.90.0170.04716.68
5.4.80.0100.04316.52
5.4.70.0070.05016.55
5.4.60.0130.04316.54
5.4.50.0070.04716.49
5.4.40.0170.04016.59
5.4.30.0100.04716.46
5.4.20.0170.04016.59
5.4.10.0200.06016.38
5.4.00.0030.06715.83
5.3.280.0100.05714.73
5.3.270.0170.06314.74
5.3.260.0070.05314.61
5.3.250.0070.07714.58
5.3.240.0100.06314.60
5.3.230.0030.05014.71
5.3.220.0070.05014.66
5.3.210.0030.06714.54
5.3.200.0130.04314.65
5.3.190.0070.05014.75
5.3.180.0030.05714.63
5.3.170.0130.04314.47
5.3.160.0130.04714.70
5.3.150.0130.07014.61
5.3.140.0070.05014.59
5.3.130.0100.07314.62
5.3.120.0100.05014.38
5.3.110.0030.06314.63
5.3.100.0130.04713.94
5.3.90.0070.07014.24
5.3.80.0170.05714.06
5.3.70.0070.06014.20
5.3.60.0070.06714.07
5.3.50.0070.05314.07
5.3.40.0030.05313.92
5.3.30.0000.05313.92
5.3.20.0030.05313.68
5.3.10.0030.05313.73
5.3.00.0130.04313.72
5.2.170.0100.05311.20
5.2.160.0030.04010.97
5.2.150.0200.04311.11
5.2.140.0070.04711.22
5.2.130.0070.03710.93
5.2.120.0030.05711.10
5.2.110.0070.04311.05
5.2.100.0130.05010.95
5.2.90.0030.04311.18
5.2.80.0070.05711.27
5.2.70.0100.04311.00
5.2.60.0100.04310.96
5.2.50.0030.04311.00
5.2.40.0070.04711.17
5.2.30.0000.05010.94
5.2.20.0030.05311.04
5.2.10.0000.06010.77
5.2.00.0030.04310.80
5.1.60.0030.05010.19
5.1.50.0030.0409.84
5.1.40.0030.0509.95
5.1.30.0070.05010.41
5.1.20.0100.03010.30
5.1.10.0100.04010.13
5.1.00.0070.04710.07
5.0.50.0030.0308.60
5.0.40.0030.0408.65
5.0.30.0030.0508.42
5.0.20.0130.0308.17
5.0.10.0000.0308.27
5.0.00.0030.0508.23
4.4.90.0070.0176.22
4.4.80.0000.0276.22
4.4.70.0100.0136.22
4.4.60.0100.0206.22
4.4.50.0100.0136.22
4.4.40.0030.0336.20
4.4.30.0000.0236.18
4.4.20.0070.0276.07
4.4.10.0070.0276.07
4.4.00.0130.0336.07
4.3.110.0000.0236.07
4.3.100.0000.0236.07
4.3.90.0030.0206.07
4.3.80.0070.0306.07
4.3.70.0030.0206.07
4.3.60.0000.0236.07
4.3.50.0000.0236.07
4.3.40.0000.0336.07
4.3.30.0130.0276.07
4.3.20.0030.0206.07
4.3.10.0030.0206.07
4.3.00.0070.01312.80

preferences:
139.72 ms | 1394 KiB | 7 Q