3v4l.org

run code in 300+ PHP versions simultaneously
<?php class World { static $id = 0; protected $uid; protected $worldName; const type = 'world'; public function __construct( $worldName ) { $this->setUID(); $this->wrldName = $worldName; } private function setUID() { $this->uid = self::$id++; } public function whoIsPerson( Person $person ) { $personUID = $person->getUID(); echo $personUID; if( $personUID === 0 && $this->worldName === 'Rapture' ) return 'Jack'; elseif( $personUID === 0 && $this->worldName === 'Columbia' ) return 'Elizabeth'; else return 'Unknown Person'; } } class Person { static $id = 0; protected $uid; private function setUID() { $this->uid = self::$id++; } public function getUID() { return $this->uid; } } $person1 = new Person(); $world1 = new World('Rapture'); echo $world1->whoIsPerson( $person1 ); $world2 = new World('Columbia'); echo $world2->whoIsPerson( $person1 );

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.60.0060.01318.56
8.3.50.0160.00521.99
8.3.40.0120.00318.84
8.3.30.0110.00418.84
8.3.20.0000.00818.90
8.3.10.0000.00819.38
8.3.00.0080.00021.85
8.2.180.0120.00316.63
8.2.170.0100.01022.96
8.2.160.0110.00420.38
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0050.00520.94
8.2.110.0060.00320.56
8.2.100.0090.00318.03
8.2.90.0000.00919.17
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0030.00517.97
8.2.30.0040.00419.32
8.2.20.0000.00717.74
8.2.10.0070.00117.80
8.2.00.0060.00317.70
8.1.280.0110.00725.92
8.1.270.0000.00923.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0080.00422.49
8.1.230.0040.00820.90
8.1.220.0050.00318.77
8.1.210.0080.00018.97
8.1.200.0030.00717.36
8.1.190.0000.00917.53
8.1.180.0030.00618.10
8.1.170.0030.00618.59
8.1.160.0060.00318.90
8.1.150.0040.00418.54
8.1.140.0040.00417.43
8.1.130.0000.00717.79
8.1.120.0080.00017.36
8.1.110.0040.00417.49
8.1.100.0050.00317.41
8.1.90.0060.00317.48
8.1.80.0000.00717.50
8.1.70.0030.00317.46
8.1.60.0040.00417.58
8.1.50.0070.00017.50
8.1.40.0000.00717.43
8.1.30.0060.00317.67
8.1.20.0040.00417.60
8.1.10.0000.00717.52
8.1.00.0000.00817.56
8.0.300.0080.00019.90
8.0.290.0060.00317.18
8.0.280.0020.00518.50
8.0.270.0000.00817.28
8.0.260.0030.00616.82
8.0.250.0050.00317.02
8.0.240.0050.00317.09
8.0.230.0030.00317.05
8.0.220.0070.00017.01
8.0.210.0030.00316.86
8.0.200.0030.00317.06
8.0.190.0050.00316.99
8.0.180.0030.00517.02
8.0.170.0080.00016.92
8.0.160.0000.00717.01
8.0.150.0070.00016.79
8.0.140.0070.00016.87
8.0.130.0030.00313.45
8.0.120.0040.00416.97
8.0.110.0040.00416.95
8.0.100.0030.00516.81
8.0.90.0040.00416.88
8.0.80.0140.00716.94
8.0.70.0030.00316.76
8.0.60.0000.00716.79
8.0.50.0050.00316.79
8.0.30.0030.01517.00
8.0.20.0140.00517.41
8.0.10.0040.00417.03
8.0.00.0120.00516.73
7.4.330.0030.00316.67
7.4.320.0030.00316.52
7.4.300.0000.00616.62
7.4.290.0000.00716.41
7.4.280.0030.00316.51
7.4.270.0000.00716.45
7.4.260.0000.00513.40
7.4.250.0040.00416.56
7.4.240.0030.00316.41
7.4.230.0040.00416.42
7.4.220.0140.00416.41
7.4.210.0060.00916.55
7.4.200.0030.00316.32
7.4.190.0040.00416.77
7.4.160.0100.01016.27
7.4.150.0090.00917.40
7.4.140.0110.00817.86
7.4.130.0180.02016.46
7.4.120.0110.00516.62
7.4.110.0030.01316.67
7.4.100.0120.00616.59
7.4.90.0120.00616.61
7.4.80.0100.00719.39
7.4.70.0130.01016.24
7.4.60.0100.00716.50
7.4.50.0060.00316.66
7.4.40.0090.00622.77
7.4.30.0050.01116.54
7.4.00.0070.00714.87
7.3.330.0000.00513.37
7.3.320.0060.00013.37
7.3.310.0040.00416.27
7.3.300.0000.00716.29
7.3.290.0000.02016.50
7.3.280.0120.00516.35
7.3.270.0110.00517.40
7.3.260.0100.00818.24
7.3.250.0040.01416.58
7.3.240.0030.01316.57
7.3.230.0140.00316.48
7.3.210.0130.00316.73
7.3.200.0030.01319.39
7.3.190.0180.00416.55
7.3.180.0000.01616.49
7.3.170.0090.01216.41
7.3.160.0090.00916.29
7.3.120.0000.01215.00
7.2.330.0120.00616.73
7.2.320.0070.01016.80
7.2.310.0060.01316.75
7.2.300.0170.00716.59
7.2.290.0090.00916.80
7.2.80.0000.01016.52
7.2.60.0130.00916.95
7.2.00.0150.00419.53
7.1.200.0000.01115.71
7.1.100.0080.00818.18
7.1.70.0030.00717.00
7.1.60.0030.02019.40
7.1.50.0000.01117.06
7.1.00.0100.06722.37
7.0.200.0000.00816.58
7.0.140.0070.07022.15
7.0.70.0070.03721.79
7.0.60.0070.08021.82
7.0.50.0070.08022.16
7.0.40.0000.07020.10
7.0.30.0070.06720.09
7.0.20.0100.07020.14
7.0.10.0030.07720.13
7.0.00.0000.08320.08
5.6.220.0070.07720.73
5.6.210.0070.05720.65
5.6.200.0070.04321.04
5.6.190.0100.07321.13
5.6.180.0070.08021.14
5.6.170.0070.07020.96
5.6.160.0070.07321.02
5.6.150.0100.06020.97
5.6.140.0030.07321.05
5.6.130.0030.08021.03
5.6.120.0100.07721.02
5.6.110.0030.07720.95
5.6.100.0100.08321.04
5.6.90.0100.08021.16
5.6.80.0070.07720.47
5.6.70.0100.07720.48
5.6.60.0100.06720.55
5.6.50.0100.07020.38
5.6.40.0070.05020.38
5.6.30.0000.08020.38
5.6.20.0130.05320.38
5.6.10.0100.07320.44
5.6.00.0000.07720.45
5.5.360.0030.07720.49
5.5.350.0030.04720.40
5.5.340.0070.04020.78
5.5.330.0130.06720.79
5.5.320.0170.07320.84
5.5.310.0000.08020.95
5.5.300.0100.07320.79
5.5.290.0030.09020.79
5.5.280.0070.08020.81
5.5.270.0030.08320.91
5.5.260.0000.04720.93
5.5.250.0030.07320.75
5.5.240.0070.07020.30
5.5.230.0070.07720.25
5.5.220.0130.05320.03
5.5.210.0170.04720.12
5.5.200.0000.08320.01
5.5.190.0030.08320.17
5.5.180.0030.07720.28
5.5.160.0000.07719.99
5.5.150.0000.08320.14
5.5.140.0030.07020.05
5.5.130.0030.08020.14
5.5.120.0030.08320.16
5.5.110.0000.08019.97
5.5.100.0130.06320.11
5.5.90.0070.07720.14
5.5.80.0000.07720.11
5.5.70.0100.07020.08
5.5.60.0030.07720.15
5.5.50.0130.06720.04
5.5.40.0070.08020.01
5.5.30.0030.05720.12
5.5.20.0030.06720.14
5.5.10.0130.06020.05
5.5.00.0130.07020.02
5.4.450.0000.08719.36
5.4.440.0000.08019.37
5.4.430.0030.07319.55
5.4.420.0000.04719.41
5.4.410.0030.07319.24
5.4.400.0030.06019.09
5.4.390.0030.05019.04
5.4.380.0100.07018.85
5.4.370.0030.07319.15
5.4.360.0100.06019.16
5.4.350.0000.05719.18
5.4.340.0070.07318.87
5.4.320.0030.05718.88
5.4.310.0030.06719.23
5.4.300.0070.07319.13
5.4.290.0070.07318.95
5.4.280.0000.08019.11
5.4.270.0000.07318.95
5.4.260.0030.07319.20
5.4.250.0070.07718.87
5.4.240.0030.07019.20
5.4.230.0000.08319.04
5.4.220.0070.07719.25
5.4.210.0070.08018.89
5.4.200.0000.07719.02
5.4.190.0030.03719.24
5.4.180.0030.08319.08
5.4.170.0030.08019.04
5.4.160.0070.05719.03
5.4.150.0030.08018.85
5.4.140.0000.08316.48
5.4.130.0170.06316.27
5.4.120.0100.05316.35
5.4.110.0070.06716.55
5.4.100.0000.07716.55
5.4.90.0070.06016.48
5.4.80.0070.07016.43
5.4.70.0000.07016.50
5.4.60.0070.05716.47
5.4.50.0070.06316.51
5.4.40.0070.06316.37
5.4.30.0030.07316.52
5.4.20.0000.07716.29
5.4.10.0030.05316.33
5.4.00.0000.06315.79
5.3.290.0030.06314.82
5.3.280.0070.06014.63
5.3.270.0000.07014.65
5.3.260.0030.07714.57
5.3.250.0000.08014.68
5.3.240.0030.07014.68
5.3.230.0030.07714.75
5.3.220.0030.06014.73
5.3.210.0000.07014.53
5.3.200.0070.05314.70
5.3.190.0070.04014.72
5.3.180.0030.07014.68
5.3.170.0070.07014.66
5.3.160.0030.07714.53
5.3.150.0030.07314.50
5.3.140.0030.07314.71
5.3.130.0000.06714.67
5.3.120.0030.07314.68
5.3.110.0100.06714.64
5.3.100.0030.07014.18
5.3.90.0030.07314.05
5.3.80.0070.05014.08
5.3.70.0030.07314.09
5.3.60.0030.07014.08
5.3.50.0000.08013.98
5.3.40.0070.07313.98
5.3.30.0070.07013.82
5.3.20.0030.07313.69
5.3.10.0000.07313.73
5.3.00.0100.06313.59
5.2.170.0030.06311.30
5.2.160.0070.05311.30
5.2.150.0070.06311.30
5.2.140.0000.06311.30
5.2.130.0030.06011.30
5.2.120.0000.06011.30
5.2.110.0030.06711.30
5.2.100.0000.06311.30
5.2.90.0030.06311.30
5.2.80.0000.05311.30
5.2.70.0030.06311.30
5.2.60.0070.05011.30
5.2.50.0030.04011.30
5.2.40.0000.06711.30
5.2.30.0100.05011.30
5.2.20.0030.05311.30
5.2.10.0100.05311.30
5.2.00.0030.06011.30
5.1.60.0030.05011.30
5.1.50.0030.05011.30
5.1.40.0030.05011.30
5.1.30.0130.04311.30
5.1.20.0030.05011.30
5.1.10.0030.05311.30
5.1.00.0070.04311.30
5.0.50.0000.04311.30
5.0.40.0000.03711.30
5.0.30.0070.05711.30
5.0.20.0070.04011.30
5.0.10.0100.03711.30
5.0.00.0070.05711.30
4.4.90.0030.03311.30
4.4.80.0030.03011.30
4.4.70.0030.03711.30
4.4.60.0030.03311.30
4.4.50.0000.03711.30
4.4.40.0000.05311.30
4.4.30.0030.03311.30
4.4.20.0030.03311.30
4.4.10.0030.02711.30
4.4.00.0000.04311.30
4.3.110.0030.03011.30
4.3.100.0000.02311.30
4.3.90.0000.03011.30
4.3.80.0000.05311.30
4.3.70.0000.03711.30
4.3.60.0030.03011.30
4.3.50.0000.04011.30
4.3.40.0000.05011.30
4.3.30.0030.03311.30
4.3.20.0030.03311.30
4.3.10.0070.03711.30
4.3.00.0000.03711.30

preferences:
36.22 ms | 401 KiB | 5 Q