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(){ $this->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.0070.00718.55
8.3.50.0030.01421.92
8.3.40.0120.00318.89
8.3.30.0070.00718.96
8.3.20.0080.00020.29
8.3.10.0040.00422.10
8.3.00.0070.00022.38
8.2.180.0090.00616.50
8.2.170.0090.00622.96
8.2.160.0110.01120.73
8.2.150.0040.00424.18
8.2.140.0110.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00017.63
8.2.110.0050.00522.17
8.2.100.0100.00319.51
8.2.90.0000.00819.05
8.2.80.0040.00419.50
8.2.70.0050.00317.50
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0000.00718.09
8.2.30.0000.00717.88
8.2.20.0040.00417.58
8.2.10.0040.00419.33
8.2.00.0040.00417.57
8.1.280.0110.00825.92
8.1.270.0060.00322.20
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0050.00523.96
8.1.230.0110.00019.01
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0090.00017.10
8.1.190.0040.00417.26
8.1.180.0000.00818.10
8.1.170.0030.00518.52
8.1.160.0040.00721.88
8.1.150.0000.00718.39
8.1.140.0040.00417.39
8.1.130.0030.00517.81
8.1.120.0070.00017.34
8.1.110.0040.00417.37
8.1.100.0000.00717.23
8.1.90.0040.00417.35
8.1.80.0070.00017.32
8.1.70.0030.00517.28
8.1.60.0000.00917.45
8.1.50.0040.00417.31
8.1.40.0040.00417.30
8.1.30.0030.00517.45
8.1.20.0060.00317.43
8.1.10.0070.00017.44
8.1.00.0040.00417.34
8.0.300.0040.00418.77
8.0.290.0050.00516.93
8.0.280.0000.00718.39
8.0.270.0000.00717.15
8.0.260.0000.00616.73
8.0.250.0070.00016.84
8.0.240.0040.00416.88
8.0.230.0040.00416.93
8.0.220.0000.00816.73
8.0.210.0000.00716.79
8.0.200.0000.00616.89
8.0.190.0000.00816.91
8.0.180.0000.00716.91
8.0.170.0080.00016.90
8.0.160.0000.00816.82
8.0.150.0030.00516.87
8.0.140.0050.00216.72
8.0.130.0000.00613.25
8.0.120.0060.00316.83
8.0.110.0040.00416.92
8.0.100.0050.00216.68
8.0.90.0040.00416.80
8.0.80.0030.01516.80
8.0.70.0000.00716.64
8.0.60.0000.00716.84
8.0.50.0040.00416.63
8.0.30.0100.00816.93
8.0.20.0110.00917.40
8.0.10.0040.00416.84
8.0.00.0040.01516.69
7.4.330.0040.00415.00
7.4.320.0030.00316.58
7.4.300.0060.00016.60
7.4.290.0030.00316.48
7.4.280.0040.00416.45
7.4.270.0070.00016.59
7.4.260.0060.00316.54
7.4.250.0000.00716.54
7.4.240.0010.00616.55
7.4.230.0030.00316.56
7.4.220.0100.00716.54
7.4.210.0120.00416.61
7.4.200.0030.00316.70
7.4.190.0040.00416.53
7.4.160.0120.00416.45
7.4.150.0130.00317.40
7.4.140.0150.01117.86
7.4.130.0100.01116.43
7.4.120.0060.01116.59
7.4.110.0060.01116.75
7.4.100.0060.01216.48
7.4.90.0070.01016.51
7.4.80.0130.00319.39
7.4.70.0110.00516.46
7.4.60.0090.01216.65
7.4.50.0000.00816.51
7.4.40.0000.01722.77
7.4.30.0000.01616.54
7.4.00.0070.01114.83
7.3.330.0000.00613.39
7.3.320.0020.00213.30
7.3.310.0060.00316.35
7.3.300.0030.00316.13
7.3.290.0000.01616.30
7.3.280.0100.00916.34
7.3.270.0030.01517.40
7.3.260.0090.00916.39
7.3.250.0120.00816.41
7.3.240.0120.00616.25
7.3.230.0070.01016.39
7.3.210.0130.01016.38
7.3.200.0040.01819.39
7.3.190.0160.00316.49
7.3.180.0030.01216.40
7.3.170.0040.01316.58
7.3.160.0030.01416.61
7.3.120.0040.01114.95
7.2.330.0090.00916.81
7.2.320.0060.01616.63
7.2.310.0030.01416.40
7.2.300.0060.01116.45
7.2.290.0120.00816.71
7.2.00.0000.01819.16
7.1.100.0040.00717.94
7.1.70.0000.00816.95
7.1.60.0140.01119.82
7.1.50.0070.01016.79
7.1.00.0070.07322.33
7.0.200.0000.01016.51
7.0.140.0100.06722.00
7.0.60.0030.08320.05
7.0.50.0000.05017.87
7.0.40.0030.05020.30
7.0.30.0270.03320.20
7.0.20.0370.06020.09
7.0.10.0300.08020.28
7.0.00.0070.05720.24
5.6.280.0070.07021.09
5.6.210.0030.04020.76
5.6.200.0030.04318.25
5.6.190.0070.08020.76
5.6.180.4130.03020.68
5.6.170.0330.07720.43
5.6.160.0070.05720.54
5.6.150.0030.03718.16
5.6.140.0130.07318.15
5.6.130.0070.06718.23
5.6.120.0000.06321.04
5.6.110.0070.08021.12
5.6.100.0130.08021.12
5.6.90.0030.09321.11
5.6.80.0070.07020.39
5.6.70.0230.03720.29
5.5.350.0030.05320.48
5.5.340.0130.06718.05
5.5.330.0070.08720.31
5.5.320.0370.07020.27
5.5.310.0430.07020.32
5.5.300.0030.08317.98
5.5.290.0030.08017.98
5.5.280.0030.08720.99
5.5.270.0070.08720.88
5.5.260.0170.07720.78
5.5.250.0100.07720.48
5.5.240.0100.06020.20
5.4.450.0170.06319.39
5.4.440.0370.05019.48
5.4.430.0400.05019.28
5.4.420.0300.06019.39
5.4.410.0200.06719.05
5.4.400.0000.06018.78
5.4.390.0000.06018.75
5.4.380.0230.05318.51
5.4.370.0230.05018.77
5.4.360.0270.04318.66
5.4.350.0300.04718.60
5.4.340.0270.04718.74
5.4.320.0060.04312.51
5.4.310.0040.04212.51
5.4.300.0080.03712.51
5.4.290.0100.04112.50
5.4.280.0040.04012.40
5.4.270.0130.04719.22
5.4.260.0130.05019.23
5.4.250.0130.05018.91
5.4.240.0100.06719.00
5.4.230.0130.05318.99
5.4.220.0030.07318.82
5.4.210.0070.08019.22
5.4.200.0200.05718.94
5.4.190.0070.06719.09
5.4.180.0170.06318.83
5.4.170.0070.06018.98
5.4.160.0130.06019.03
5.4.150.0100.05719.00
5.4.140.0170.06016.60
5.4.130.0130.05716.66
5.4.120.0130.04716.66
5.4.110.0200.06716.72
5.4.100.0100.06016.71
5.4.90.0170.06316.75
5.4.80.0070.06016.52
5.4.70.0230.04716.57
5.4.60.0070.06016.74
5.4.50.0070.05016.45
5.4.40.0130.07316.67
5.4.30.0100.05716.39
5.4.20.0070.07016.67
5.4.10.0200.04316.38
5.4.00.0170.08016.14
5.3.290.0100.04012.80
5.3.280.0130.07014.80
5.3.270.0070.06014.66
5.3.260.0170.05314.64
5.3.250.0130.05014.91
5.3.240.0070.07014.88
5.3.230.0270.05714.90
5.3.220.0170.05014.88
5.3.210.0170.05714.64
5.3.200.0130.04714.57
5.3.190.0130.05714.87
5.3.180.0130.07714.84
5.3.170.0100.05014.77
5.3.160.0100.06014.66
5.3.150.0130.05314.84
5.3.140.0230.03714.75
5.3.130.0100.05014.62
5.3.120.0130.06714.69
5.3.110.0030.08314.84
5.3.100.0030.07014.35
5.3.90.0130.07014.30
5.3.80.0270.03714.33
5.3.70.0170.06314.24
5.3.60.0170.06014.21
5.3.50.0130.04714.17
5.3.40.0070.05714.26
5.3.30.0200.05313.77
5.3.20.0170.06313.88
5.3.10.0030.05713.71
5.3.00.0170.04713.87
5.2.170.0070.04711.34
5.2.160.0170.05011.16
5.2.150.0070.05011.45
5.2.140.0030.06711.33
5.2.130.0200.05311.11
5.2.120.0170.03311.23
5.2.110.0230.02711.11
5.2.100.0100.04011.29
5.2.90.0130.04011.16
5.2.80.0100.05711.15
5.2.70.0070.05711.39
5.2.60.0030.06311.26
5.2.50.0200.04711.25
5.2.40.0130.03311.19
5.2.30.0030.06310.86
5.2.20.0100.04311.02
5.2.10.0100.03710.75
5.2.00.0100.06311.02
5.1.60.0030.04710.27
5.1.50.0100.0439.97
5.1.40.0000.0409.87
5.1.30.0100.04710.20
5.1.20.0030.05010.58
5.1.10.0200.04710.38
5.1.00.0100.03310.30
5.0.50.0030.0338.63
5.0.40.0100.0338.61
5.0.30.0070.0508.28
5.0.20.0000.0408.25
5.0.10.0030.0308.48
5.0.00.0070.0408.33
4.4.90.0000.0236.04
4.4.80.0000.0305.88
4.4.70.0030.0305.93
4.4.60.0000.0275.95
4.4.50.0070.0205.93
4.4.40.0000.0405.95
4.4.30.0030.0275.86
4.4.20.0030.0335.98
4.4.10.0070.0236.04
4.4.00.0000.0376.00
4.3.110.0070.0275.91
4.3.100.0030.0305.89
4.3.90.0100.0235.89
4.3.80.0070.0305.82
4.3.70.0000.0275.77
4.3.60.0030.0205.85
4.3.50.0000.0235.83
4.3.40.0030.0505.81
4.3.30.0030.0305.52
4.3.20.0030.0235.52
4.3.10.0030.0205.52
4.3.00.0030.0208.17

preferences:
44.49 ms | 401 KiB | 5 Q