3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * http://www.php.net/manual/en/language.variables.scope.php */ class ClassWithPropertiesThatHaveTheSameName { private $name = 'something'; // here they are the same, but differentiated public function setName($name) { $this->name = $name; } /** * @returns String|Other */ public function getName() { return $this->name; } /** * @returns Array|Transversable */ public function getAndTestLocalVariableNameArray() { $name = array('value' = $this->name); return $name; } } $same = new ClassWithPropertiesThatHaveTheSameName(); $same->setName('oranges and pecans in a tea from a tree'); echo $same->getName(); print_r($same->getAndTestLocalVariableNameArray()); ?>

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.270.0070.06318.98
5.4.260.0070.08318.80
5.4.250.0100.07318.65
5.4.240.0100.05318.80
5.4.230.0130.05018.95
5.4.220.0130.05318.94
5.4.210.0100.07718.95
5.4.200.0130.05718.99
5.4.190.0030.05718.82
5.4.180.0200.05718.82
5.4.170.0200.06318.78
5.4.160.0070.06018.73
5.4.150.0030.06318.81
5.4.140.0200.05716.55
5.4.130.0100.05316.57
5.4.120.0170.04716.30
5.4.110.0170.05716.55
5.4.100.0100.05716.50
5.4.90.0130.06016.41
5.4.80.0070.04716.55
5.4.70.0030.05316.48
5.4.60.0070.07016.31
5.4.50.0030.06016.47
5.4.40.0030.06716.54
5.4.30.0030.05316.31
5.4.20.0230.05716.47
5.4.10.0130.05316.45
5.4.00.0030.05015.90
5.3.280.0130.04714.60
5.3.270.0030.07714.70
5.3.260.0130.07714.83
5.3.250.0100.07314.60
5.3.240.0170.04714.69
5.3.230.0100.05314.51
5.3.220.0000.08014.48
5.3.210.0200.06314.67
5.3.200.0130.06314.65
5.3.190.0030.06014.79
5.3.180.0130.06714.55
5.3.170.0170.05014.55
5.3.160.0200.04014.49
5.3.150.0170.07014.73
5.3.140.0130.04714.53
5.3.130.0030.05714.46
5.3.120.0070.06014.53
5.3.110.0270.05314.71
5.3.100.0030.07013.86
5.3.90.0070.06714.20
5.3.80.0100.07014.18
5.3.70.0100.07014.18
5.3.60.0030.05314.09
5.3.50.0130.05314.15
5.3.40.0030.07313.92
5.3.30.0100.04714.14
5.3.20.0030.05313.70
5.3.10.0100.06313.55
5.3.00.0030.05313.80
5.2.170.0100.03711.13
5.2.160.0070.03711.24
5.2.150.0130.03711.22
5.2.140.0070.04311.14
5.2.130.0000.05711.11
5.2.120.0030.04311.05
5.2.110.0100.03711.18
5.2.100.0100.04011.19
5.2.90.0100.04011.19
5.2.80.0170.03711.18
5.2.70.0070.06311.00
5.2.60.0030.06311.15
5.2.50.0070.05010.85
5.2.40.0070.05011.09
5.2.30.0170.04710.98
5.2.20.0070.04010.96
5.2.10.0130.03710.93
5.2.00.0200.02710.80
5.1.60.0030.03710.09
5.1.50.0030.03710.16
5.1.40.0070.03310.08
5.1.30.0100.03010.52
5.1.20.0030.04010.33
5.1.10.0130.03710.13
5.1.00.0070.04010.02
5.0.50.0070.0278.39
5.0.40.0030.0308.37
5.0.30.0030.0538.06
5.0.20.0100.0238.46
5.0.10.0030.0378.15
5.0.00.0100.0378.32
4.4.90.0000.0276.86
4.4.80.0000.0276.86
4.4.70.0000.0276.86
4.4.60.0070.0206.86
4.4.50.0000.0336.86
4.4.40.0030.0336.86
4.4.30.0030.0236.86
4.4.20.0030.0206.86
4.4.10.0030.0306.86
4.4.00.0070.0336.86
4.3.110.0030.0306.86
4.3.100.0000.0236.86
4.3.90.0030.0236.86
4.3.80.0070.0476.86
4.3.70.0070.0276.86
4.3.60.0100.0206.86
4.3.50.0000.0236.86
4.3.40.0070.0306.86
4.3.30.0000.0236.86
4.3.20.0070.0236.86
4.3.10.0000.0276.86
4.3.00.0000.0237.85

preferences:
138.21 ms | 1394 KiB | 7 Q