3v4l.org

run code in 300+ PHP versions simultaneously
<?php class StaticA { public function setEmail($redirect) { $this->email = $redirect; } protected function returnthis(){ return $this; } private function dosomething(){ echo "Unrsprüngliche Methode"; $obj = parent::returnthis(); echo $obj->email; } public function classInfo(){ echo get_class(new self). "\n"; echo $this->email. "\n"; } } class StaticB extends StaticA { public function test(){ parent::classInfo(); } public function doit(){ parent::dosomething(); } private function dosomething(){ $obj = parent::returnthis(); echo "Neue Methode!". "\n"; echo "Hier ist die E-Mail aus der Elternklasse heraus: ".$obj->email; } } $object = new StaticB(); $object->setEmail("erno@01art.de"); $object->doit();

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.0100.01018.43
8.3.50.0150.00321.98
8.3.40.0090.00618.71
8.3.30.0100.00318.97
8.3.20.0050.00320.38
8.3.10.0000.00722.04
8.3.00.0040.00422.31
8.2.180.0140.00416.32
8.2.170.0060.00822.96
8.2.160.0140.00320.76
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00417.63
8.2.110.0000.00921.00
8.2.100.0110.00017.78
8.2.90.0060.00618.80
8.2.80.0060.00317.97
8.2.70.0000.00817.50
8.2.60.0040.00417.80
8.2.50.0060.00318.10
8.2.40.0030.00518.03
8.2.30.0030.00618.00
8.2.20.0040.00417.61
8.2.10.0060.00317.55
8.2.00.0040.00417.63
8.1.280.0150.00025.92
8.1.270.0040.00422.05
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00622.87
8.1.230.0040.00817.70
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0060.00317.00
8.1.180.0000.00818.10
8.1.170.0030.00518.40
8.1.160.0060.00321.95
8.1.150.0070.00018.53
8.1.140.0040.00417.34
8.1.130.0000.00817.84
8.1.120.0080.00017.41
8.1.110.0030.00517.23
8.1.100.0040.00417.32
8.1.90.0070.00017.20
8.1.80.0030.00317.33
8.1.70.0070.00017.33
8.1.60.0030.00617.45
8.1.50.0000.00717.31
8.1.40.0050.00217.38
8.1.30.0000.00717.57
8.1.20.0000.00817.55
8.1.10.0080.00017.29
8.1.00.0020.00517.20
8.0.300.0070.00018.77
8.0.290.0080.00016.58
8.0.280.0050.00318.34
8.0.270.0030.00317.09
8.0.260.0030.00316.82
8.0.250.0030.00316.82
8.0.240.0040.00416.96
8.0.230.0040.00416.83
8.0.220.0000.00716.85
8.0.210.0050.00316.82
8.0.200.0070.00016.89
8.0.190.0000.00716.84
8.0.180.0000.00716.80
8.0.170.0040.00416.82
8.0.160.0040.00416.71
8.0.150.0080.00016.77
8.0.140.0050.00216.82
8.0.130.0030.00313.20
8.0.120.0000.00716.83
8.0.110.0050.00316.73
8.0.100.0070.00016.63
8.0.90.0040.00416.72
8.0.80.0030.01216.86
8.0.70.0040.00416.79
8.0.60.0040.00416.73
8.0.50.0080.00016.72
8.0.30.0060.01217.00
8.0.20.0110.00817.40
8.0.10.0000.00716.98
8.0.00.0120.00516.66
7.4.330.0030.00315.00
7.4.320.0000.00616.46
7.4.300.0000.00616.61
7.4.290.0030.00316.53
7.4.280.0030.00516.62
7.4.270.0000.00716.51
7.4.260.0030.00616.51
7.4.250.0040.00416.53
7.4.240.0040.00316.59
7.4.230.0030.00316.34
7.4.220.0120.00616.73
7.4.210.0070.00716.56
7.4.200.0000.00716.63
7.4.190.0040.00416.34
7.4.160.0160.00316.55
7.4.150.0030.01317.40
7.4.140.0130.00617.86
7.4.130.0090.00816.62
7.4.120.0070.01016.47
7.4.110.0090.00916.61
7.4.100.0200.00316.64
7.4.90.0090.00916.44
7.4.80.0070.01119.39
7.4.70.0120.01016.44
7.4.60.0140.00716.46
7.4.50.0080.00016.43
7.4.40.0100.00722.77
7.4.30.0090.00616.51
7.4.00.0040.01415.20
7.3.330.0020.00413.33
7.3.320.0020.00213.14
7.3.310.0040.00416.27
7.3.300.0000.00716.31
7.3.290.0000.01316.40
7.3.280.0090.00816.34
7.3.270.0140.00417.40
7.3.260.0080.00816.38
7.3.250.0090.00916.50
7.3.240.0130.01016.40
7.3.230.0140.00416.39
7.3.210.0100.01316.44
7.3.200.0180.00619.39
7.3.190.0100.01016.47
7.3.180.0040.01216.50
7.3.170.0130.00316.50
7.3.160.0140.00716.34
7.3.120.0060.01015.00
7.3.10.0060.00916.66
7.3.00.0130.00016.44
7.2.330.0140.00416.43
7.2.320.0090.01216.58
7.2.310.0120.01116.41
7.2.300.0040.01116.42
7.2.290.0060.00916.66
7.2.130.0060.00316.68
7.2.120.0130.00616.83
7.2.110.0110.00616.45
7.2.100.0150.00616.08
7.2.90.0130.00716.57
7.2.80.0110.00517.00
7.2.70.0060.01016.52
7.2.60.0080.01016.77
7.2.50.0130.00316.75
7.2.40.0030.00916.97
7.2.30.0120.00917.03
7.2.20.0070.00216.47
7.2.10.0040.01416.92
7.2.00.0010.01117.89
7.1.250.0090.00015.64
7.1.200.0030.01015.70
7.1.100.0060.00617.86
7.1.70.0000.00716.82
7.1.60.0120.01219.82
7.1.50.0070.00416.86
7.1.00.0100.07022.31
7.0.200.0030.00316.77
7.0.140.0030.07322.09
7.0.100.0170.07719.89
7.0.90.0130.06019.96
7.0.80.0030.06319.96
7.0.70.0130.07020.00
7.0.60.0070.06719.94
7.0.50.0000.08020.40
7.0.40.0170.07020.10
7.0.30.0170.07320.07
7.0.20.0070.04020.13
7.0.10.0100.03719.98
7.0.00.0130.07320.09
5.6.280.0130.06321.05
5.6.250.0070.04020.70
5.6.240.0100.08020.73
5.6.230.0030.08720.75
5.6.220.0070.08320.66
5.6.210.0170.07320.48
5.6.200.0030.06721.17
5.6.190.0030.07021.05
5.6.180.0130.04321.04
5.6.170.0130.07021.05
5.6.160.0030.08021.02
5.6.150.0100.08321.04
5.6.140.0130.07021.05
5.6.130.0070.05321.04
5.6.120.0070.05021.07
5.6.110.0070.08321.04
5.6.100.0170.07320.94
5.6.90.0070.08721.04
5.6.80.0170.06720.42
5.6.70.0100.06720.31
5.6.60.0130.07020.47
5.6.50.0100.07720.39
5.6.40.0030.08020.37
5.6.30.0030.08320.46
5.6.20.0000.09020.37
5.6.10.0200.06720.33
5.6.00.0030.08320.45
5.5.380.0070.07320.36
5.5.370.0030.05720.46
5.5.360.0030.06720.37
5.5.350.0170.07020.38
5.5.340.0030.07020.80
5.5.330.0100.06720.84
5.5.320.0170.06720.81
5.5.310.0130.06720.81
5.5.300.0030.06020.92
5.5.290.0100.08320.77
5.5.280.0030.08720.86
5.5.270.0030.08720.87
5.5.260.0000.05020.83
5.5.250.0070.06720.68
5.5.240.0030.06020.16
5.5.230.0130.08320.21
5.5.220.0100.04020.20
5.5.210.0170.06720.21
5.5.200.0070.07320.24
5.5.190.0100.08320.18
5.5.180.0200.06720.24
5.5.160.0100.05720.25
5.5.150.0070.07020.10
5.5.140.0130.03320.23
5.5.130.0070.06020.26
5.5.120.0030.04720.18
5.5.110.0100.06020.20
5.5.100.0170.07020.12
5.5.90.0230.05320.17
5.5.80.0070.04020.05
5.5.70.0000.04720.05
5.5.60.0130.07720.08
5.5.50.0130.05720.14
5.5.40.0070.08020.14
5.5.30.0130.05320.08
5.5.20.0070.08320.00
5.5.10.0070.08020.04
5.5.00.0000.06720.08
5.4.450.0070.08319.36
5.4.440.0030.07719.41
5.4.430.0070.07719.27
5.4.420.0070.07019.53
5.4.410.0100.07019.24
5.4.400.0030.04719.09
5.4.390.0130.04319.03
5.4.380.0070.08019.07
5.4.370.0130.06319.20
5.4.360.0070.05318.87
5.4.350.0100.07719.12
5.4.340.0100.07019.21
5.4.320.0030.04019.05
5.4.310.0070.05318.85
5.4.300.0070.04719.00
5.4.290.0100.06719.09
5.4.280.0070.07019.04
5.4.270.0130.05019.16
5.4.260.0100.04319.16
5.4.250.0030.07018.88
5.4.240.0070.05019.15
5.4.230.0030.03718.89
5.4.220.0030.08319.11
5.4.210.0170.06319.09
5.4.200.0130.07019.12
5.4.190.0100.04318.89
5.4.180.0030.06319.08
5.4.170.0100.07019.17
5.4.160.0000.05019.02
5.4.150.0070.08019.02
5.4.140.0100.07316.30
5.4.130.0070.03716.44
5.4.120.0130.03316.38
5.4.110.0070.07716.56
5.4.100.0100.06716.56
5.4.90.0000.08016.40
5.4.80.0070.05316.42
5.4.70.0070.04016.36
5.4.60.0070.07016.47
5.4.50.0100.03716.42
5.4.40.0100.05316.54
5.4.30.0030.06016.42
5.4.20.0100.06316.25
5.4.10.0030.06016.48
5.4.00.0100.03015.83
5.3.290.0070.04314.78
5.3.280.0100.07014.53
5.3.270.0070.08014.63
5.3.260.0030.07014.71
5.3.250.0100.07314.61
5.3.240.0100.04014.67
5.3.230.0100.07314.54
5.3.220.0030.04714.56
5.3.210.0030.06014.51
5.3.200.0100.06314.63
5.3.190.0000.05714.67
5.3.180.0070.07314.50
5.3.170.0030.06314.54
5.3.160.0070.07014.52
5.3.150.0100.03714.64
5.3.140.0030.07314.63
5.3.130.0100.07014.52
5.3.120.0100.07314.62
5.3.110.0070.04314.62
5.3.100.0030.04313.97
5.3.90.0070.05314.09
5.3.80.0030.06713.93
5.3.70.0070.07714.08
5.3.60.0230.02713.94
5.3.50.0170.03014.02
5.3.40.0030.05013.96
5.3.30.0100.04013.92
5.3.20.0030.06713.80
5.3.10.0070.04313.81
5.3.00.0070.04013.70
5.2.170.0000.05711.22
5.2.160.0070.05311.26
5.2.150.0000.07011.16
5.2.140.0000.05711.04
5.2.130.0270.03011.05
5.2.120.0030.05010.98
5.2.110.0030.03311.16
5.2.100.0100.02711.01
5.2.90.0030.03011.16
5.2.80.0030.05010.96
5.2.70.0000.07011.23
5.2.60.0130.05310.95
5.2.50.0030.05711.13
5.2.40.0000.03711.07
5.2.30.0130.05011.04
5.2.20.0000.05011.06
5.2.10.0070.05710.88
5.2.00.0070.05010.77
5.1.60.0030.06010.09
5.1.50.0000.05710.10
5.1.40.0070.0409.99
5.1.30.0030.05710.41
5.1.20.0100.03310.38
5.1.10.0030.05710.04
5.1.00.0200.01710.07
5.0.50.0070.0438.40
5.0.40.0000.0408.54
5.0.30.0000.0378.33
5.0.20.0030.0238.12
5.0.10.0100.0378.28
5.0.00.0030.0438.23
4.4.90.0030.0338.05
4.4.80.0100.0278.05
4.4.70.0030.0208.05
4.4.60.0000.0378.05
4.4.50.0070.0338.05
4.4.40.0000.0408.05
4.4.30.0030.0378.05
4.4.20.0030.0178.05
4.4.10.0000.0278.05
4.4.00.0030.0238.05
4.3.110.0030.0338.05
4.3.100.0000.0338.05
4.3.90.0000.0378.05
4.3.80.0070.0438.05
4.3.70.0000.0378.05
4.3.60.0000.0378.05
4.3.50.0070.0238.05
4.3.40.0030.0408.05
4.3.30.0030.0338.05
4.3.20.0000.0278.05
4.3.10.0000.0338.05
4.3.00.0000.0378.05

preferences:
41.8 ms | 401 KiB | 5 Q