3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { protected $_themeMap = [ "microsite" => [ "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"; } } } ?>

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.05018.74
5.4.250.0100.07318.74
5.4.240.0100.05018.96
5.4.230.0170.06018.96
5.4.220.0070.05319.01
5.4.210.0070.05318.95
5.4.200.0100.05019.00
5.4.190.0070.05318.95
5.4.180.0200.04318.95
5.4.170.0130.04718.88
5.4.160.0070.05018.92
5.4.150.0170.06718.99
5.4.140.0130.04316.33
5.4.130.0100.06716.49
5.4.120.0070.05016.36
5.4.110.0030.05716.48
5.4.100.0070.06716.51
5.4.90.0100.04316.52
5.4.80.0000.05316.43
5.4.70.0100.05016.54
5.4.60.0130.05016.36
5.4.50.0100.04716.34
5.4.40.0030.05316.44
5.4.30.0100.05016.45
5.4.20.0130.05016.58
5.4.10.0130.04716.52
5.4.00.0030.05715.93
5.3.280.0170.04314.42
5.3.270.0030.05314.59
5.3.260.0100.05014.59
5.3.250.0100.05014.69
5.3.240.0330.04314.59
5.3.230.0130.04314.52
5.3.220.0000.05714.56
5.3.210.0100.05014.55
5.3.200.0100.06014.57
5.3.190.0130.06014.57
5.3.180.0130.04314.46
5.3.170.0030.05314.64
5.3.160.0070.05014.77
5.3.150.0100.05014.72
5.3.140.0130.07014.53
5.3.130.0100.05014.63
5.3.120.0170.04014.72
5.3.110.0000.05714.68
5.3.100.0070.05713.86
5.3.90.0200.03713.86
5.3.80.0030.05014.09
5.3.70.0170.04013.98
5.3.60.0130.06014.08
5.3.50.0100.04314.03
5.3.40.0030.05014.02
5.3.30.0070.06013.73
5.3.20.0070.04713.77
5.3.10.0100.04313.63
5.3.00.0000.05713.80
5.2.170.0030.05711.12
5.2.160.0100.06011.11
5.2.150.0100.04011.20
5.2.140.0070.03711.10
5.2.130.0030.04311.07
5.2.120.0070.05011.05
5.2.110.0000.04311.08
5.2.100.0100.03311.20
5.2.90.0030.04011.08
5.2.80.0000.06011.08
5.2.70.0100.04311.16
5.2.60.0070.05311.13
5.2.50.0070.04010.97
5.2.40.0100.03710.82
5.2.30.0070.03710.95
5.2.20.0070.03711.03
5.2.10.0070.03710.93
5.2.00.0000.04310.79
5.1.60.0000.03710.23
5.1.50.0030.04710.23
5.1.40.0030.0379.97
5.1.30.0100.03710.39
5.1.20.0030.04710.18
5.1.10.0130.03010.05
5.1.00.0070.05010.22
5.0.50.0030.0278.78
5.0.40.0070.0238.44
5.0.30.0070.0378.18
5.0.20.0030.0278.29
5.0.10.0000.0308.11
5.0.00.0030.0408.16
4.4.90.0030.0277.33
4.4.80.0070.0177.33
4.4.70.0030.0207.33
4.4.60.0030.0277.33
4.4.50.0000.0277.33
4.4.40.0030.0337.33
4.4.30.0130.0207.33
4.4.20.0000.0307.33
4.4.10.0000.0337.33
4.4.00.0000.0407.33
4.3.110.0000.0237.33
4.3.100.0030.0207.33
4.3.90.0070.0177.33
4.3.80.0000.0377.33
4.3.70.0030.0237.33
4.3.60.0030.0207.33
4.3.50.0100.0177.33
4.3.40.0030.0307.33
4.3.30.0000.0237.33
4.3.20.0000.0237.33
4.3.10.0000.0307.33
4.3.00.0070.0207.28

preferences:
148.66 ms | 1394 KiB | 7 Q