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(){ self::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.0040.01118.31
8.3.50.0220.00522.06
8.3.40.0140.00018.64
8.3.30.0070.00719.01
8.3.20.0060.00320.21
8.3.10.0080.00021.98
8.3.00.0080.00022.52
8.2.180.0070.01116.38
8.2.170.0060.00922.96
8.2.160.0070.01420.66
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0050.00326.16
8.2.120.0090.00017.63
8.2.110.0040.00422.24
8.2.100.0090.00317.52
8.2.90.0000.00719.10
8.2.80.0080.00317.97
8.2.70.0040.00417.25
8.2.60.0040.00417.68
8.2.50.0030.00518.07
8.2.40.0060.00318.16
8.2.30.0000.00717.92
8.2.20.0030.00517.41
8.2.10.0000.00817.57
8.2.00.0070.00017.63
8.1.280.0040.01125.92
8.1.270.0050.00322.24
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00323.92
8.1.230.0110.00018.83
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0050.00517.00
8.1.190.0050.00317.39
8.1.180.0040.00418.10
8.1.170.0060.00318.66
8.1.160.0060.00321.95
8.1.150.0000.00718.38
8.1.140.0070.00017.25
8.1.130.0000.00717.77
8.1.120.0050.00317.36
8.1.110.0040.00417.29
8.1.100.0040.00417.36
8.1.90.0040.00417.20
8.1.80.0000.00717.33
8.1.70.0040.00417.32
8.1.60.0030.00617.30
8.1.50.0040.00417.46
8.1.40.0000.00717.45
8.1.30.0030.00617.58
8.1.20.0030.00517.54
8.1.10.0000.00717.39
8.1.00.0000.00817.34
8.0.300.0030.00318.77
8.0.290.0040.00417.05
8.0.280.0040.00418.31
8.0.270.0000.00717.14
8.0.260.0030.00318.32
8.0.250.0050.00316.90
8.0.240.0040.00416.87
8.0.230.0070.00316.88
8.0.220.0040.00416.89
8.0.210.0070.00016.84
8.0.200.0000.00716.89
8.0.190.0050.00316.88
8.0.180.0000.00816.92
8.0.170.0040.00416.81
8.0.160.0070.00016.75
8.0.150.0000.00816.66
8.0.140.0070.00316.75
8.0.130.0000.00613.25
8.0.120.0040.00416.84
8.0.110.0000.00716.70
8.0.100.0070.00016.73
8.0.90.0030.00516.88
8.0.80.0120.00316.72
8.0.70.0040.00416.87
8.0.60.0070.00016.79
8.0.50.0000.00716.81
8.0.30.0070.01216.94
8.0.20.0170.00517.40
8.0.10.0000.00816.85
8.0.00.0120.00816.52
7.4.330.0030.00315.00
7.4.320.0060.00016.61
7.4.300.0030.00316.63
7.4.290.0030.00316.54
7.4.280.0030.00316.63
7.4.270.0030.00316.67
7.4.260.0070.00316.63
7.4.250.0030.00516.39
7.4.240.0020.00616.50
7.4.230.0030.00316.53
7.4.220.0060.01216.49
7.4.210.0040.01216.50
7.4.200.0040.00416.27
7.4.190.0040.00416.78
7.4.160.0170.00016.54
7.4.150.0060.01217.40
7.4.140.0140.00817.86
7.4.130.0090.00916.63
7.4.120.0080.01016.45
7.4.110.0180.00416.64
7.4.100.0110.01216.54
7.4.90.0120.00416.38
7.4.80.0150.00919.39
7.4.70.0130.00316.45
7.4.60.0160.00016.39
7.4.50.0080.00016.66
7.4.40.0140.00322.77
7.4.30.0070.01016.43
7.4.00.0090.00614.71
7.3.330.0040.00413.24
7.3.320.0000.00613.13
7.3.310.0050.00516.21
7.3.300.0000.00716.25
7.3.290.0100.01016.33
7.3.280.0090.00816.31
7.3.270.0060.01017.40
7.3.260.0120.00616.53
7.3.250.0110.00816.37
7.3.240.0130.00316.27
7.3.230.0030.01316.39
7.3.210.0090.00916.54
7.3.200.0140.00719.39
7.3.190.0040.01416.37
7.3.180.0090.01216.56
7.3.170.0180.00016.34
7.3.160.0100.01116.30
7.3.120.0030.01414.98
7.2.330.0120.00616.70
7.2.320.0090.00916.33
7.2.310.0150.00316.62
7.2.300.0150.00016.85
7.2.290.0090.01216.54
7.1.70.0060.00316.82
7.1.60.0060.01919.82
7.1.50.0090.00917.05
7.1.00.0170.06322.35
7.0.200.0060.00316.66
7.0.140.0000.07722.08
7.0.60.0200.06720.09
7.0.50.0070.08017.81
7.0.40.0070.04320.02
7.0.30.0200.04720.18
7.0.20.0270.07720.06
7.0.10.0070.08320.20
7.0.00.0070.07720.16
5.6.280.0000.07721.00
5.6.210.0200.07320.68
5.6.200.0030.08318.15
5.6.190.0130.06020.41
5.6.180.0470.07320.51
5.6.170.0300.08020.47
5.6.160.0000.09320.52
5.6.150.0000.04718.19
5.6.140.0070.03718.18
5.6.130.0070.08018.13
5.6.120.0230.06720.93
5.6.110.0100.08021.00
5.6.100.0170.07320.89
5.6.90.0170.07720.97
5.6.80.0130.05020.39
5.5.350.0230.07720.44
5.5.340.0030.04018.04
5.5.330.0100.05320.44
5.5.320.0430.05320.34
5.5.310.0200.04020.27
5.5.300.0070.07017.93
5.5.290.0030.05717.94
5.5.280.0100.08720.78
5.5.270.0130.07720.75
5.5.260.0230.06720.68
5.5.250.0070.08720.70
5.5.240.0200.04320.28
5.4.450.0700.02319.41
5.4.440.0630.04719.64
5.4.430.0070.04319.19
5.4.420.0100.03319.40
5.4.410.0070.05718.70
5.4.400.0130.05318.67
5.4.390.0130.05018.71
5.4.380.0230.05318.63
5.4.370.0230.05018.52
5.4.360.0200.05318.63
5.4.350.0200.05718.80
5.4.340.0130.06018.59
5.4.320.0110.04112.51
5.4.310.0040.03912.51
5.4.300.0070.04112.52
5.4.290.0050.03812.50
5.4.280.0060.03612.40
5.4.270.0170.05018.98
5.4.260.0130.07018.96
5.4.250.0200.08319.13
5.4.240.0200.06719.02
5.4.230.0200.07019.16
5.4.220.0200.06018.91
5.4.210.0130.07018.83
5.4.200.0170.06719.00
5.4.190.0100.06318.86
5.4.180.0170.06719.16
5.4.170.0030.07018.91
5.4.160.0170.05719.01
5.4.150.0130.06019.22
5.4.140.0100.07316.50
5.4.130.0000.08016.67
5.4.120.0130.07316.64
5.4.110.0130.07016.74
5.4.100.0000.06016.75
5.4.90.0100.06716.74
5.4.80.0130.05716.61
5.4.70.0200.06016.46
5.4.60.0200.06316.40
5.4.50.0130.05016.70
5.4.40.0070.05316.71
5.4.30.0100.06016.65
5.4.20.0100.05316.62
5.4.10.0130.06316.51
5.4.00.0130.06315.98
5.3.290.0060.03712.80
5.3.280.0100.07314.66
5.3.270.0270.06314.73
5.3.260.0100.06314.93
5.3.250.0170.05014.61
5.3.240.0170.05714.82
5.3.230.0200.05314.82
5.3.220.0130.06014.46
5.3.210.0170.07314.85
5.3.200.0070.07014.64
5.3.190.0170.06014.86
5.3.180.0070.05314.79
5.3.170.0070.06714.75
5.3.160.0070.05314.60
5.3.150.0070.07314.84
5.3.140.0070.07014.61
5.3.130.0100.06714.78
5.3.120.0200.05314.44
5.3.110.0170.07014.84
5.3.100.0100.08314.32
5.3.90.0070.05314.21
5.3.80.0070.05714.20
5.3.70.0130.05014.32
5.3.60.0170.04014.07
5.3.50.0070.05314.25
5.3.40.0070.07014.13
5.3.30.0100.05714.12
5.3.20.0100.06313.58
5.3.10.0070.06313.84
5.3.00.0130.06713.70
5.2.170.0100.04711.35
5.2.160.0000.05011.33
5.2.150.0030.05711.36
5.2.140.0100.04311.32
5.2.130.0130.04011.31
5.2.120.0130.04011.08
5.2.110.0070.05311.32
5.2.100.0000.06011.16
5.2.90.0070.05011.23
5.2.80.0100.05711.10
5.2.70.0070.06011.39
5.2.60.0100.05011.06
5.2.50.0200.04311.03
5.2.40.0200.04310.89
5.2.30.0130.04311.16
5.2.20.0000.05711.17
5.2.10.0170.04011.08
5.2.00.0100.05310.70
5.1.60.0070.06310.00
5.1.50.0070.04310.29
5.1.40.0200.03310.20
5.1.30.0100.03710.39
5.1.20.0170.02710.65
5.1.10.0170.03310.36
5.1.00.0100.05310.03
5.0.50.0170.0208.61
5.0.40.0100.0308.71
5.0.30.0030.0478.34
5.0.20.0000.0308.49
5.0.10.0030.0478.39
5.0.00.0100.0378.06
4.4.90.0100.0177.34
4.4.80.0030.0277.34
4.4.70.0030.0277.34
4.4.60.0030.0277.34
4.4.50.0070.0307.34
4.4.40.0100.0337.34
4.4.30.0030.0277.34
4.4.20.0000.0277.34
4.4.10.0000.0277.34
4.4.00.0000.0407.34
4.3.110.0070.0207.34
4.3.100.0070.0207.34
4.3.90.0030.0207.34
4.3.80.0030.0377.34
4.3.70.0070.0277.34
4.3.60.0030.0237.34
4.3.50.0000.0377.34
4.3.40.0070.0377.34
4.3.30.0000.0277.34
4.3.20.0000.0307.34
4.3.10.0000.0237.34
4.3.00.0000.01715.59

preferences:
38.58 ms | 400 KiB | 5 Q