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 self::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.0120.00918.29
8.3.50.0160.00521.96
8.3.40.0070.00718.88
8.3.30.0040.01119.09
8.3.20.0000.00720.21
8.3.10.0030.00522.12
8.3.00.0050.00322.51
8.2.180.0180.00316.88
8.2.170.0180.00322.96
8.2.160.0070.01020.80
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00417.63
8.2.110.0090.00021.99
8.2.100.0040.00819.51
8.2.90.0040.00419.17
8.2.80.0090.00019.66
8.2.70.0030.00517.63
8.2.60.0060.00318.04
8.2.50.0000.00918.07
8.2.40.0050.00318.16
8.2.30.0040.00418.00
8.2.20.0070.00017.63
8.2.10.0040.00417.77
8.2.00.0040.00417.75
8.1.280.0100.01025.92
8.1.270.0050.00322.16
8.1.260.0070.00426.35
8.1.250.0000.00828.09
8.1.240.0040.00423.96
8.1.230.0000.01019.16
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0080.00017.53
8.1.180.0000.00818.10
8.1.170.0050.00318.62
8.1.160.0000.00722.00
8.1.150.0020.00518.58
8.1.140.0030.00517.47
8.1.130.0000.00717.84
8.1.120.0000.00717.39
8.1.110.0070.00017.40
8.1.100.0000.00817.48
8.1.90.0000.00817.29
8.1.80.0050.00317.41
8.1.70.0030.00617.51
8.1.60.0000.00917.62
8.1.50.0040.00417.54
8.1.40.0000.00817.44
8.1.30.0080.00017.67
8.1.20.0040.00417.72
8.1.10.0000.00717.64
8.1.00.0050.00217.54
8.0.300.0070.00018.77
8.0.290.0070.00017.17
8.0.280.0030.00318.34
8.0.270.0070.00017.21
8.0.260.0000.00616.89
8.0.250.0070.00017.09
8.0.240.0060.00316.91
8.0.230.0040.00416.91
8.0.220.0000.00717.04
8.0.210.0030.00317.02
8.0.200.0040.00417.00
8.0.190.0030.00517.05
8.0.180.0000.00717.04
8.0.170.0000.00816.88
8.0.160.0000.00816.90
8.0.150.0070.00016.82
8.0.140.0030.00616.93
8.0.130.0030.00313.46
8.0.120.0080.00016.97
8.0.110.0000.00716.96
8.0.100.0040.00416.80
8.0.90.0040.00416.96
8.0.80.0100.00516.92
8.0.70.0080.00016.79
8.0.60.0000.00716.87
8.0.50.0000.00716.89
8.0.30.0080.01017.15
8.0.20.0070.01517.40
8.0.10.0030.00617.11
8.0.00.0090.00916.80
7.4.330.0000.00715.00
7.4.320.0030.00316.54
7.4.300.0000.00616.43
7.4.290.0030.00316.59
7.4.280.0030.00316.61
7.4.270.0000.00816.62
7.4.260.0000.01016.63
7.4.250.0000.00816.39
7.4.240.0030.00416.54
7.4.230.0050.00216.36
7.4.220.0180.00316.46
7.4.210.0110.00516.57
7.4.200.0070.00016.63
7.4.190.0040.00416.75
7.4.160.0090.00916.49
7.4.150.0070.01117.40
7.4.140.0140.00717.86
7.4.130.0080.01116.63
7.4.120.0110.00616.56
7.4.110.0060.01216.38
7.4.100.0140.00716.50
7.4.90.0140.00416.43
7.4.80.0040.02019.39
7.4.70.0030.01316.45
7.4.60.0090.00816.52
7.4.50.0080.00016.27
7.4.40.0070.01122.77
7.4.30.0140.00716.44
7.4.00.0090.00915.09
7.3.330.0060.00013.29
7.3.320.0020.00213.36
7.3.310.0090.00016.48
7.3.300.0040.00416.34
7.3.290.0110.00316.36
7.3.280.0050.01216.37
7.3.270.0140.00917.40
7.3.260.0040.01416.70
7.3.250.0100.00816.45
7.3.240.0120.00916.47
7.3.230.0100.00716.39
7.3.210.0080.00816.45
7.3.200.0100.01119.39
7.3.190.0130.00416.54
7.3.180.0120.00416.36
7.3.170.0120.00916.27
7.3.160.0080.00816.48
7.3.120.0000.01614.91
7.3.10.0040.00716.43
7.3.00.0070.00616.43
7.2.330.0100.00716.60
7.2.320.0110.00816.40
7.2.310.0160.00616.44
7.2.300.0130.00316.80
7.2.290.0080.00816.40
7.2.130.0030.01016.86
7.2.120.0000.01716.75
7.2.110.0110.00516.84
7.2.100.0040.00416.91
7.2.90.0040.01116.98
7.2.80.0030.00916.88
7.2.70.0000.01516.86
7.2.60.0070.00716.92
7.2.50.0050.00516.86
7.2.40.0090.00317.00
7.2.30.0070.00317.02
7.2.20.0060.00316.92
7.2.10.0090.00017.02
7.2.00.0050.01118.29
7.1.250.0100.00315.47
7.1.200.0060.00615.59
7.1.100.0070.00417.89
7.1.70.0070.00316.67
7.1.60.0090.01619.82
7.1.50.0030.01716.54
7.1.00.0100.07022.35
7.0.200.0040.00416.47
7.0.140.0070.07022.09
7.0.60.0070.09319.87
7.0.50.0070.07717.92
7.0.40.0070.04020.18
7.0.30.0170.04320.26
7.0.20.0300.06320.23
7.0.10.0230.04020.16
7.0.00.0030.07320.09
5.6.280.0070.07021.11
5.6.210.0000.04320.61
5.6.200.0070.06318.13
5.6.190.0170.07720.45
5.6.180.4200.04720.39
5.6.170.0330.07320.56
5.6.160.0030.05020.57
5.6.150.0070.06718.18
5.6.140.0030.08018.16
5.6.130.0070.05718.27
5.6.120.0070.08321.02
5.6.110.0070.08320.99
5.6.100.0070.08321.11
5.6.90.0070.05021.01
5.6.80.0130.07020.41
5.6.70.0230.05020.51
5.5.350.0000.05320.34
5.5.340.0130.08017.99
5.5.330.0070.07320.47
5.5.320.0330.06020.24
5.5.310.0270.03720.32
5.5.300.0070.07017.97
5.5.290.0130.07017.95
5.5.280.0100.08020.88
5.5.270.0100.06720.67
5.5.260.0070.08320.66
5.5.250.0130.07320.63
5.5.240.0030.08720.36
5.4.450.0400.05019.54
5.4.440.0200.04019.20
5.4.430.1030.04019.48
5.4.420.0530.03719.57
5.4.410.0100.05318.96
5.4.400.0070.05718.91
5.4.390.0270.04718.53
5.4.380.0200.06318.48
5.4.370.0170.05318.74
5.4.360.0200.04718.79
5.4.350.0130.06018.72
5.4.340.0230.04718.41
5.4.320.0090.03312.51
5.4.310.0070.03712.51
5.4.300.0010.04212.50
5.4.290.0080.03512.50
5.4.280.0070.04912.40
5.4.270.0130.05318.86
5.4.260.0100.07719.14
5.4.250.0170.05019.04
5.4.240.0030.06719.04
5.4.230.0030.06719.04
5.4.220.0130.06019.09
5.4.210.0200.05719.04
5.4.200.0130.05018.84
5.4.190.0130.06019.22
5.4.180.0130.05018.99
5.4.170.0130.05318.90
5.4.160.0100.05319.21
5.4.150.0170.05318.89
5.4.140.0130.06316.60
5.4.130.0030.05316.58
5.4.120.0100.05716.44
5.4.110.0130.05716.63
5.4.100.0170.05716.69
5.4.90.0100.05316.73
5.4.80.0200.04016.58
5.4.70.0070.06716.72
5.4.60.0100.06716.63
5.4.50.0030.05316.39
5.4.40.0070.05016.71
5.4.30.0230.05316.55
5.4.20.0100.05016.64
5.4.10.0030.05716.48
5.4.00.0200.04315.88
5.3.290.0080.04812.80
5.3.280.0000.09014.78
5.3.270.0030.06314.88
5.3.260.0070.08014.67
5.3.250.0100.06714.81
5.3.240.0130.07014.88
5.3.230.0070.05014.74
5.3.220.0070.07714.63
5.3.210.0030.06314.81
5.3.200.0030.05714.63
5.3.190.0100.05714.86
5.3.180.0070.05314.62
5.3.170.0130.07014.62
5.3.160.0000.06314.86
5.3.150.0100.05714.76
5.3.140.0030.05714.56
5.3.130.0070.08014.78
5.3.120.0000.08714.44
5.3.110.0130.07014.64
5.3.100.0070.05314.10
5.3.90.0170.05014.11
5.3.80.0130.04713.89
5.3.70.0130.04314.09
5.3.60.0200.04314.31
5.3.50.0030.07014.16
5.3.40.0000.06713.96
5.3.30.0070.07013.96
5.3.20.0030.05713.92
5.3.10.0030.07713.95
5.3.00.0130.04713.91
5.2.170.0030.05011.32
5.2.160.0030.06311.45
5.2.150.0000.05311.20
5.2.140.0170.04311.35
5.2.130.0030.04311.15
5.2.120.0100.04311.10
5.2.110.0030.04311.15
5.2.100.0070.04711.41
5.2.90.0030.04311.22
5.2.80.0100.05711.38
5.2.70.0100.04011.30
5.2.60.0200.06011.27
5.2.50.0070.06011.23
5.2.40.0030.04311.22
5.2.30.0130.04311.02
5.2.20.0100.04710.95
5.2.10.0100.03310.86
5.2.00.0130.03710.99
5.1.60.0070.04310.05
5.1.50.0170.03310.21
5.1.40.0030.05710.17
5.1.30.0130.03310.38
5.1.20.0030.04310.53
5.1.10.0030.05010.37
5.1.00.0100.03310.16
5.0.50.0070.0378.76
5.0.40.0000.0438.68
5.0.30.0070.0408.43
5.0.20.0070.0338.25
5.0.10.0070.0408.44
5.0.00.0100.0478.35
4.4.90.0070.0206.59
4.4.80.0130.0206.59
4.4.70.0030.0276.59
4.4.60.0000.0276.59
4.4.50.0030.0276.59
4.4.40.0000.0376.59
4.4.30.0000.0336.59
4.4.20.0130.0236.59
4.4.10.0030.0206.59
4.4.00.0000.0376.59
4.3.110.0030.0236.59
4.3.100.0070.0276.59
4.3.90.0070.0206.59
4.3.80.0030.0476.59
4.3.70.0030.0236.59
4.3.60.0070.0276.59
4.3.50.0030.0236.59
4.3.40.0130.0276.59
4.3.30.0000.0236.59
4.3.20.0030.0306.59
4.3.10.0030.0276.59
4.3.00.0130.0135.86

preferences:
37.17 ms | 401 KiB | 5 Q