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() . "\n\n"; 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)
8.3.40.0060.00918.71
8.3.30.0070.00719.18
8.3.20.0080.00020.38
8.3.10.0040.00421.92
8.3.00.0040.00422.52
8.2.170.0150.00022.96
8.2.160.0090.00618.79
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0040.00419.48
8.2.110.0090.00020.52
8.2.100.0110.00019.76
8.2.90.0040.00418.92
8.2.80.0080.00018.03
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0000.00818.22
8.2.30.0060.00318.13
8.2.20.0040.00417.79
8.2.10.0050.00317.69
8.2.00.0040.00417.68
8.1.270.0000.00823.99
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0080.00023.66
8.1.230.0110.00019.15
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0000.00817.53
8.1.180.0050.00318.74
8.1.170.0050.00318.62
8.1.160.0050.00222.08
8.1.150.0040.00418.61
8.1.140.0040.00417.48
8.1.130.0070.00017.78
8.1.120.0000.00717.47
8.1.110.0040.00417.48
8.1.100.0000.00717.50
8.1.90.0000.00717.51
8.1.80.0040.00417.51
8.1.70.0000.00817.40
8.1.60.0000.00817.54
8.1.50.0000.00717.58
8.1.40.0040.00417.55
8.1.30.0040.00417.64
8.1.20.0000.00817.62
8.1.10.0000.00817.50
8.1.00.0000.01017.54
8.0.300.0000.00718.77
8.0.290.0000.00817.05
8.0.280.0000.00718.34
8.0.270.0000.00717.27
8.0.260.0070.00016.76
8.0.250.0020.00516.96
8.0.240.0030.00316.98
8.0.230.0040.00416.91
8.0.220.0000.00716.91
8.0.210.0000.00716.92
8.0.200.0060.00017.01
8.0.190.0050.00217.01
8.0.180.0050.00316.94
8.0.170.0030.00516.94
8.0.160.0040.00416.89
8.0.150.0060.00316.88
8.0.140.0050.00316.86
8.0.130.0000.00913.38
8.0.120.0000.00816.88
8.0.110.0040.00416.91
8.0.100.0080.00016.94
8.0.90.0040.00416.80
8.0.80.0000.02216.95
8.0.70.0040.00416.75
8.0.60.0040.00416.73
8.0.50.0000.00716.66
8.0.30.0050.01417.07
8.0.20.0080.01017.40
8.0.10.0030.00516.91
8.0.00.0100.00816.76
7.4.330.0030.00315.07
7.4.320.0000.00616.56
7.4.300.0000.00616.64
7.4.290.0070.00016.57
7.4.280.0070.00016.61
7.4.270.0000.00716.54
7.4.260.0000.00716.49
7.4.250.0040.00416.48
7.4.240.0020.00516.52
7.4.230.0030.00316.64
7.4.220.0090.00916.62
7.4.210.0080.00916.63
7.4.200.0030.00316.32
7.4.190.0050.00216.61
7.4.160.0080.00816.51
7.4.150.0090.00917.40
7.4.140.0090.00917.86
7.4.130.0080.00916.31
7.4.120.0130.00316.46
7.4.110.0110.00616.51
7.4.100.0060.01216.51
7.4.90.0150.00316.58
7.4.80.0150.00619.39
7.4.70.0120.00416.57
7.4.60.0070.01316.63
7.4.50.0080.00016.16
7.4.40.0030.01322.77
7.4.30.0110.00516.53
7.4.00.0120.00315.04
7.3.330.0020.00213.14
7.3.320.0050.00013.06
7.3.310.0070.00016.36
7.3.300.0000.00616.32
7.3.290.0100.00316.30
7.3.280.0080.01016.28
7.3.270.0170.00917.40
7.3.260.0070.01016.29
7.3.250.0070.01116.34
7.3.240.0030.01516.22
7.3.230.0090.01016.41
7.3.210.0090.00616.34
7.3.200.0030.01319.39
7.3.190.0050.01116.22
7.3.180.0060.00916.63
7.3.170.0090.01816.38
7.3.160.0060.00916.33
7.3.120.0000.01714.79
7.2.330.0130.00416.74
7.2.320.0150.00916.42
7.2.310.0030.01316.88
7.2.300.0100.00716.65
7.2.290.0130.00316.83
7.2.00.0050.01619.42
7.1.70.0060.00817.24
7.1.60.0080.00317.32
7.1.50.0110.01116.94
7.1.00.0070.07322.26
7.0.200.0070.01016.76
7.0.140.0030.07321.92
7.0.60.0100.05319.96
7.0.50.0000.04317.96
7.0.40.0100.08020.01
7.0.30.0270.07020.26
7.0.20.0300.05020.19
7.0.10.0300.04720.08
7.0.00.0070.08320.25
5.6.280.0100.06720.86
5.6.210.0070.04020.70
5.6.200.0070.08018.19
5.6.190.0100.04020.67
5.6.180.3470.03720.41
5.6.170.0470.07020.55
5.6.160.0070.06020.52
5.6.150.0100.08018.28
5.6.140.0000.04718.17
5.6.130.0070.04718.15
5.6.120.0000.04321.04
5.6.110.0100.08721.05
5.6.100.0100.08020.89
5.6.90.0170.07720.94
5.6.80.0030.08320.49
5.6.70.0400.05320.43
5.5.350.0070.07720.45
5.5.340.0070.08018.09
5.5.330.0100.08020.43
5.5.320.0200.04320.35
5.5.310.0200.03720.35
5.5.300.0100.07718.08
5.5.290.0030.06017.97
5.5.280.0070.05320.81
5.5.270.0100.08720.80
5.5.260.0000.08720.85
5.5.250.0070.08320.70
5.5.240.0070.07020.29
5.4.450.0600.05019.63
5.4.440.0370.07319.61
5.4.430.0030.06019.64
5.4.420.0070.05719.45
5.4.410.0070.05719.52
5.4.400.0770.00018.82
5.4.390.0870.00018.79
5.4.380.0070.07018.76
5.4.370.0500.04318.77
5.4.360.0230.04718.78
5.4.350.0270.05318.78
5.4.340.0330.05318.51
5.4.320.0040.04412.51
5.4.310.0060.04712.50
5.4.300.0050.03712.50
5.4.290.0060.04412.50
5.4.280.0100.04012.39
5.4.270.0070.05318.97
5.4.260.0030.05318.91
5.4.250.0100.07318.93
5.4.240.0070.05318.71
5.4.230.0070.05318.86
5.4.220.0130.04719.05
5.4.210.0130.05318.70
5.4.200.0170.05019.07
5.4.190.0200.04318.79
5.4.180.0030.05718.94
5.4.170.0170.05019.01
5.4.160.0100.07319.04
5.4.150.0130.07018.86
5.4.140.0070.05316.41
5.4.130.0170.04016.41
5.4.120.0070.05316.34
5.4.110.0200.04016.33
5.4.100.0070.05316.49
5.4.90.0100.04716.37
5.4.80.0100.05316.41
5.4.70.0070.05016.43
5.4.60.0100.05316.23
5.4.50.0100.06716.41
5.4.40.0130.06316.39
5.4.30.0130.04016.30
5.4.20.0170.05316.39
5.4.10.0200.05316.39
5.4.00.0100.04315.98
5.3.290.0060.04912.80
5.3.280.0130.06714.77
5.3.270.0130.05714.70
5.3.260.0070.06714.79
5.3.250.0030.05314.63
5.3.240.0000.05714.67
5.3.230.0070.05014.69
5.3.220.0130.05014.55
5.3.210.0070.05314.75
5.3.200.0070.05014.48
5.3.190.0100.06714.66
5.3.180.0130.07014.54
5.3.170.0070.06314.65
5.3.160.0030.05014.75
5.3.150.0030.05314.58
5.3.140.0200.05014.58
5.3.130.0070.05314.54
5.3.120.0070.07314.64
5.3.110.0100.05314.64
5.3.100.0130.05714.18
5.3.90.0030.05714.16
5.3.80.0130.04014.20
5.3.70.0070.04714.25
5.3.60.0070.05014.07
5.3.50.0170.05714.04
5.3.40.0070.06714.04
5.3.30.0130.06314.10
5.3.20.0130.06013.61
5.3.10.0130.04013.65
5.3.00.0200.04713.64
5.2.170.0200.02711.23
5.2.160.0000.04311.22
5.2.150.0030.06011.32
5.2.140.0070.04011.30
5.2.130.0030.04310.93
5.2.120.0030.04311.19
5.2.110.0030.05011.20
5.2.100.0030.04311.19
5.2.90.0100.04310.94
5.2.80.0000.05011.32
5.2.70.0000.05011.26
5.2.60.0130.03711.05
5.2.50.0000.04310.86
5.2.40.0100.03311.09
5.2.30.0030.04011.16
5.2.20.0130.04310.79
5.2.10.0100.03310.95
5.2.00.0100.03310.57
5.1.60.0070.0479.97
5.1.50.0070.0339.97
5.1.40.0030.0439.93
5.1.30.0000.04010.40
5.1.20.0000.04010.19
5.1.10.0100.02710.05
5.1.00.0070.05010.16
5.0.50.0030.0308.35
5.0.40.0100.0308.50
5.0.30.0030.0478.19
5.0.20.0030.0278.26
5.0.10.0070.0338.02
5.0.00.0100.0478.16
4.4.90.0070.0176.65
4.4.80.0070.0276.65
4.4.70.0000.0236.65
4.4.60.0070.0176.65
4.4.50.0000.0336.65
4.4.40.0000.0506.65
4.4.30.0030.0206.65
4.4.20.0100.0236.65
4.4.10.0100.0206.65
4.4.00.0000.0336.65
4.3.110.0070.0336.65
4.3.100.0070.0276.65
4.3.90.0000.0236.65
4.3.80.0030.0406.65
4.3.70.0030.0276.65
4.3.60.0000.0236.65
4.3.50.0070.0206.65
4.3.40.0070.0376.65
4.3.30.0000.0336.65
4.3.20.0000.0306.65
4.3.10.0070.0176.65
4.3.00.0030.0237.29

preferences:
42.74 ms | 400 KiB | 5 Q