3v4l.org

run code in 300+ PHP versions simultaneously
<?php class StaticA { public function setEmail($redirect) { $this->email = $redirect; } static function dosomething(){ $obj = new static; $obj->email = "e@01art.de"; $obj->classInfo(); } function classInfo(){ echo get_class(new static). "\n"; echo $this->email. "\n"; } } class StaticB extends StaticA { function test(){ //echo get_class(new self). "\n"; parent::classInfo(); } function doit(){ self::dosomething(); echo $this->email. "\n"; } static function dosomething(){ echo "this is overwritten now". $self->email. "\n"; } } $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.01218.68
8.3.50.0130.00821.95
8.3.40.0170.00318.97
8.3.30.0120.00319.04
8.3.20.0070.00020.34
8.3.10.0050.00321.96
8.3.00.0000.00822.40
8.2.180.0150.00616.63
8.2.170.0070.00722.96
8.2.160.0110.00720.94
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0070.01126.16
8.2.120.0040.00419.11
8.2.110.0100.00022.15
8.2.100.0090.00319.57
8.2.90.0040.00419.31
8.2.80.0080.00018.04
8.2.70.0040.00717.63
8.2.60.0000.00818.04
8.2.50.0030.00618.07
8.2.40.0080.00018.22
8.2.30.0040.00418.00
8.2.20.0040.00417.70
8.2.10.0040.00419.53
8.2.00.0000.00717.76
8.1.280.0140.00025.92
8.1.270.0050.00322.21
8.1.260.0060.00626.35
8.1.250.0080.00028.09
8.1.240.0060.00323.80
8.1.230.0060.00619.01
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0030.00617.48
8.1.190.0000.00717.51
8.1.180.0000.00818.10
8.1.170.0040.00418.65
8.1.160.0080.00022.02
8.1.150.0000.00818.65
8.1.140.0050.00217.35
8.1.130.0030.00317.82
8.1.120.0040.00417.50
8.1.110.0090.00017.39
8.1.100.0040.00417.37
8.1.90.0000.00817.41
8.1.80.0000.00717.38
8.1.70.0000.00717.33
8.1.60.0040.00417.64
8.1.50.0070.00017.53
8.1.40.0040.00417.50
8.1.30.0040.00417.63
8.1.20.0080.00017.67
8.1.10.0040.00417.47
8.1.00.0070.00017.60
8.0.300.0000.00718.77
8.0.290.0040.00417.04
8.0.280.0040.00418.40
8.0.270.0030.00317.15
8.0.260.0000.00716.90
8.0.250.0070.00017.00
8.0.240.0000.01116.95
8.0.230.0000.00717.10
8.0.220.0000.00717.04
8.0.210.0000.00716.85
8.0.200.0060.00016.89
8.0.190.0000.00717.12
8.0.180.0040.00416.91
8.0.170.0040.00416.89
8.0.160.0050.00316.98
8.0.150.0040.00416.88
8.0.140.0030.00616.99
8.0.130.0000.00613.34
8.0.120.0000.00816.97
8.0.110.0040.00416.90
8.0.100.0040.00416.95
8.0.90.0040.00416.86
8.0.80.0090.00616.85
8.0.70.0040.00416.84
8.0.60.0030.00316.97
8.0.50.0040.00416.97
8.0.30.0160.00217.00
8.0.20.0090.01017.40
8.0.10.0070.00016.92
8.0.00.0130.00816.82
7.4.330.0060.00015.00
7.4.320.0030.00316.57
7.4.300.0000.00716.47
7.4.290.0000.00816.52
7.4.280.0000.00816.60
7.4.270.0000.00816.61
7.4.260.0000.00716.66
7.4.250.0040.00416.63
7.4.240.0050.00216.49
7.4.230.0030.00316.44
7.4.220.0160.00316.48
7.4.210.0100.00416.55
7.4.200.0030.00616.60
7.4.190.0040.00416.59
7.4.160.0130.00316.59
7.4.150.0110.00717.40
7.4.140.0130.01017.86
7.4.130.0130.00516.51
7.4.120.0100.00716.57
7.4.110.0130.00916.50
7.4.100.0150.00616.47
7.4.90.0120.00616.46
7.4.80.0110.00719.39
7.4.70.0130.00316.67
7.4.60.0120.01116.50
7.4.50.0030.00516.56
7.4.40.0060.01022.77
7.4.30.0120.00416.44
7.4.00.0030.01015.03
7.3.330.0000.00713.44
7.3.320.0000.00513.37
7.3.310.0030.00316.23
7.3.300.0000.00716.38
7.3.290.0030.01016.38
7.3.280.0070.01116.36
7.3.270.0090.01317.40
7.3.260.0140.00416.55
7.3.250.0120.00516.53
7.3.240.0100.00716.27
7.3.230.0200.00316.45
7.3.210.0170.00016.30
7.3.200.0100.01019.39
7.3.190.0090.01216.46
7.3.180.0130.01016.33
7.3.170.0090.00616.57
7.3.160.0120.00316.38
7.3.120.0060.00614.63
7.3.10.0210.00716.37
7.3.00.0130.00716.51
7.2.330.0100.00716.53
7.2.320.0090.00916.67
7.2.310.0090.00916.75
7.2.300.0130.00316.55
7.2.290.0140.00716.55
7.2.130.0100.00617.02
7.2.120.0100.01516.59
7.2.110.0040.01116.72
7.2.100.0300.00316.84
7.2.90.0090.00616.82
7.2.80.0120.00916.77
7.2.70.0030.01417.03
7.2.60.0230.00016.50
7.2.50.0060.00616.79
7.2.40.0120.00916.84
7.2.30.0080.00816.70
7.2.20.0220.00716.88
7.2.10.0030.00916.79
7.2.00.0130.00318.21
7.1.250.0090.00915.87
7.1.100.0090.00318.34
7.1.70.0040.00817.11
7.1.60.0170.00719.82
7.1.50.0070.01017.05
7.1.00.0000.08022.32
7.0.200.0040.00416.66
7.0.140.0000.07021.92
7.0.100.0200.06321.76
7.0.90.0030.05321.83
7.0.80.0100.07021.76
7.0.70.0030.08021.66
7.0.60.0070.08021.82
7.0.50.0030.07022.19
7.0.40.0070.07720.19
7.0.30.0070.07720.11
7.0.20.0070.08020.15
7.0.10.0170.07320.14
7.0.00.0030.06320.09
5.6.280.0030.07321.13
5.6.250.0100.07020.83
5.6.240.0100.07320.65
5.6.230.0000.08720.67
5.6.220.0100.07720.69
5.6.210.0070.08020.45
5.6.200.0030.08321.13
5.6.190.0130.07021.07
5.6.180.0000.08721.13
5.6.170.0000.07321.03
5.6.160.0170.04321.13
5.6.150.0000.08720.96
5.6.140.0030.05021.03
5.6.130.0070.08721.05
5.6.120.0070.08021.01
5.6.110.0070.08721.17
5.6.100.0100.08320.94
5.6.90.0100.06721.07
5.6.80.0130.06720.53
5.6.70.0130.05320.47
5.6.60.0070.07720.52
5.6.50.0030.08020.42
5.6.40.0000.05720.33
5.6.30.0070.08020.31
5.6.20.0100.07720.30
5.6.10.0030.07720.47
5.6.00.0100.07320.41
5.5.380.0070.07720.58
5.5.370.0200.07020.52
5.5.360.0030.06020.47
5.5.350.0100.06720.45
5.5.340.0070.07720.88
5.5.330.0100.04720.85
5.5.320.0070.08020.77
5.5.310.0070.07720.79
5.5.300.0130.04720.84
5.5.290.0000.09320.64
5.5.280.0100.06020.82
5.5.270.0070.08320.93
5.5.260.0100.05020.93
5.5.250.0130.04720.71
5.5.240.0130.06720.18
5.5.230.0130.07320.32
5.5.220.0070.04720.19
5.5.210.0100.05320.31
5.5.200.0000.05320.26
5.5.190.0000.06320.24
5.5.180.0070.06720.28
5.5.160.0100.04720.15
5.5.150.0030.07720.12
5.5.140.0130.06320.09
5.5.130.0130.06720.17
5.5.120.0070.08020.24
5.5.110.0100.04320.27
5.5.100.0030.06320.19
5.5.90.0100.04720.18
5.5.80.0070.07720.17
5.5.70.0070.08320.10
5.5.60.0000.08320.16
5.5.50.0070.07320.11
5.5.40.0070.08020.16
5.5.30.0100.04320.10
5.5.20.0170.06320.14
5.5.10.0000.08020.12
5.5.00.0070.07720.01
5.4.450.0030.08719.54
5.4.440.0100.07719.36
5.4.430.0100.07019.36
5.4.420.0100.08019.22
5.4.410.0070.07019.39
5.4.400.0030.07319.05
5.4.390.0030.07019.24
5.4.380.0070.07019.04
5.4.370.0070.07019.24
5.4.360.0030.07319.00
5.4.350.0100.07319.05
5.4.340.0100.07318.88
5.4.320.0000.08018.88
5.4.310.0130.06319.15
5.4.300.0130.05319.02
5.4.290.0030.04719.05
5.4.280.0070.04719.16
5.4.270.0100.07019.04
5.4.260.0070.07719.03
5.4.250.0130.06019.04
5.4.240.0030.08019.09
5.4.230.0100.07319.11
5.4.220.0100.07018.94
5.4.210.0130.07019.13
5.4.200.0000.08319.17
5.4.190.0070.07019.14
5.4.180.0070.07719.19
5.4.170.0100.06318.84
5.4.160.0130.06319.04
5.4.150.0100.04019.01
5.4.140.0070.07316.48
5.4.130.0000.08016.41
5.4.120.0070.04316.35
5.4.110.0070.04716.39
5.4.100.0100.05316.48
5.4.90.0030.05016.57
5.4.80.0030.07016.47
5.4.70.0070.04316.49
5.4.60.0030.07316.42
5.4.50.0100.06716.33
5.4.40.0170.06316.39
5.4.30.0100.06016.29
5.4.20.0070.07016.31
5.4.10.0100.06716.38
5.4.00.0030.08015.84
5.3.290.0030.07014.65
5.3.280.0130.07314.58
5.3.270.0030.08014.62
5.3.260.0070.07314.67
5.3.250.0070.06714.60
5.3.240.0170.05014.72
5.3.230.0070.07014.59
5.3.220.0070.07714.51
5.3.210.0100.07314.57
5.3.200.0000.07714.70
5.3.190.0070.07014.53
5.3.180.0070.07714.71
5.3.170.0030.06314.59
5.3.160.0130.04014.50
5.3.150.0070.05314.55
5.3.140.0100.07014.62
5.3.130.0130.06714.53
5.3.120.0100.07314.62
5.3.110.0030.07714.59
5.3.100.0030.08314.14
5.3.90.0000.07314.17
5.3.80.0030.07314.07
5.3.70.0100.06714.04
5.3.60.0100.07013.90
5.3.50.0130.07013.89
5.3.40.0070.07713.90
5.3.30.0070.06014.03
5.3.20.0100.06713.77
5.3.10.0070.06713.70
5.3.00.0070.04013.66
5.2.170.0070.06011.20
5.2.160.0000.06711.27
5.2.150.0030.06711.18
5.2.140.0100.05711.02
5.2.130.0030.05711.13
5.2.120.0000.04011.16
5.2.110.0070.07311.13
5.2.100.0170.04010.99
5.2.90.0000.04011.04
5.2.80.0030.06311.02
5.2.70.0100.05011.05
5.2.60.0130.04710.94
5.2.50.0100.04011.10
5.2.40.0070.06010.89
5.2.30.0130.06010.89
5.2.20.0070.05011.11
5.2.10.0130.04310.80
5.2.00.0000.04710.81
5.1.60.0070.0439.83
5.1.50.0030.02710.00
5.1.40.0000.0609.83
5.1.30.0100.05710.26
5.1.20.0000.05310.41
5.1.10.0030.04010.18
5.1.00.0100.04710.09
5.0.50.0030.0279.78
5.0.40.0030.0279.78
5.0.30.0000.0639.78
5.0.20.0070.0409.78
5.0.10.0030.0479.78
5.0.00.0000.0709.78
4.4.90.0000.0379.78
4.4.80.0100.0239.78
4.4.70.0030.0379.78
4.4.60.0000.0339.78
4.4.50.0000.0339.78
4.4.40.0030.0409.78
4.4.30.0000.0379.78
4.4.20.0000.0179.78
4.4.10.0000.0339.78
4.4.00.0000.0579.78
4.3.110.0030.0339.78
4.3.100.0000.0339.78
4.3.90.0000.0309.78
4.3.80.0030.0339.78
4.3.70.0000.0379.78
4.3.60.0070.0309.78
4.3.50.0000.0409.78
4.3.40.0030.0509.78
4.3.30.0030.0339.78
4.3.20.0000.0379.78
4.3.10.0030.0339.78
4.3.00.0000.0339.78

preferences:
72.09 ms | 401 KiB | 5 Q