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". $this->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.40.0040.01118.89
8.3.30.0110.00419.08
8.3.20.0070.00020.15
8.3.10.0040.00422.04
8.3.00.0000.00822.52
8.2.170.0110.00322.96
8.2.160.0130.00620.84
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00019.36
8.2.110.0050.00520.53
8.2.100.0090.00317.72
8.2.90.0070.00019.23
8.2.80.0050.00319.61
8.2.70.0030.00517.50
8.2.60.0060.00317.80
8.2.50.0040.00418.07
8.2.40.0030.00618.03
8.2.30.0030.00617.91
8.2.20.0070.00017.59
8.2.10.0000.00819.47
8.2.00.0000.00817.77
8.1.270.0030.00622.03
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0000.00923.75
8.1.230.0070.00320.86
8.1.220.0060.00318.55
8.1.210.0040.00418.77
8.1.200.0000.01017.25
8.1.190.0000.00917.64
8.1.180.0060.00318.10
8.1.170.0040.00818.54
8.1.160.0020.00521.96
8.1.150.0030.00518.59
8.1.140.0020.00517.41
8.1.130.0000.00717.92
8.1.120.0030.00317.43
8.1.110.0030.00617.29
8.1.100.0050.00317.39
8.1.90.0080.00017.28
8.1.80.0000.00817.40
8.1.70.0000.00817.43
8.1.60.0060.00317.50
8.1.50.0050.00317.53
8.1.40.0000.00717.57
8.1.30.0000.00717.56
8.1.20.0030.00617.66
8.1.10.0050.00317.47
8.1.00.0000.00817.54
8.0.300.0090.00018.77
8.0.290.0040.00417.05
8.0.280.0030.00318.39
8.0.270.0000.00717.22
8.0.260.0070.00016.85
8.0.250.0000.00816.95
8.0.240.0070.00316.95
8.0.230.0000.00717.04
8.0.220.0030.00316.95
8.0.210.0030.00316.94
8.0.200.0000.00616.84
8.0.190.0000.00716.98
8.0.180.0000.00816.87
8.0.170.0000.00716.93
8.0.160.0040.00416.80
8.0.150.0000.00816.76
8.0.140.0090.00016.80
8.0.130.0000.00613.36
8.0.120.0000.00816.91
8.0.110.0060.00316.81
8.0.100.0040.00416.91
8.0.90.0000.00716.95
8.0.80.0180.00016.88
8.0.70.0040.00416.76
8.0.60.0000.00716.78
8.0.50.0040.00416.92
8.0.30.0100.01017.17
8.0.20.0070.01117.40
8.0.10.0070.00016.97
8.0.00.0110.01016.70
7.4.330.0000.00515.01
7.4.320.0030.00316.48
7.4.300.0000.00716.64
7.4.290.0070.00016.52
7.4.280.0070.00016.52
7.4.270.0030.00316.42
7.4.260.0000.00716.57
7.4.250.0040.00416.50
7.4.240.0020.00516.58
7.4.230.0070.00016.56
7.4.220.0090.01816.52
7.4.210.0080.00916.53
7.4.200.0040.00416.42
7.4.190.0000.00816.57
7.4.160.0000.01616.58
7.4.150.0130.00317.40
7.4.140.0090.00917.86
7.4.130.0110.00816.43
7.4.120.0140.00616.60
7.4.110.0070.01016.65
7.4.100.0070.01116.69
7.4.90.0140.00316.51
7.4.80.0090.00919.39
7.4.70.0100.00616.47
7.4.60.0130.00616.46
7.4.50.0030.00616.56
7.4.40.0130.00322.77
7.4.30.0090.00616.46
7.4.10.0070.01014.69
7.4.00.0050.01214.95
7.3.330.0030.00313.37
7.3.320.0020.00213.34
7.3.310.0070.00016.36
7.3.300.0030.00316.25
7.3.290.0110.00616.28
7.3.280.0100.00916.38
7.3.270.0110.01117.40
7.3.260.0110.00916.35
7.3.250.0070.01016.34
7.3.240.0080.00816.61
7.3.230.0070.01016.47
7.3.210.0140.00316.58
7.3.200.0070.01119.39
7.3.190.0150.00916.57
7.3.180.0060.01116.38
7.3.170.0130.00316.41
7.3.160.0120.00316.47
7.3.130.0090.00914.95
7.3.120.0050.01114.68
7.3.110.0060.01214.63
7.3.100.0040.01114.71
7.3.90.0060.00614.64
7.3.80.0090.00314.89
7.3.70.0040.01214.77
7.3.60.0030.01214.84
7.3.50.0110.00314.69
7.3.40.0080.00414.88
7.3.30.0030.00914.88
7.3.20.0100.00716.44
7.3.10.0050.00816.47
7.3.00.0070.00816.47
7.2.330.0060.01316.73
7.2.320.0150.00316.76
7.2.310.0170.00016.80
7.2.300.0060.01016.44
7.2.290.0140.00316.67
7.2.260.0080.00615.25
7.2.250.0090.00914.84
7.2.240.0070.01014.68
7.2.230.0120.00314.95
7.2.220.0100.00615.08
7.2.210.0040.01214.62
7.2.200.0090.00615.13
7.2.190.0040.01514.75
7.2.180.0100.01015.01
7.2.170.0030.01214.79
7.2.160.0120.00615.00
7.2.150.0000.01416.90
7.2.140.0060.00616.75
7.2.130.0080.00816.88
7.2.120.0070.00716.77
7.2.110.0090.00816.90
7.2.100.0070.00916.91
7.2.90.0020.01116.81
7.2.80.0080.01016.75
7.2.70.0080.00416.77
7.2.60.0090.00616.94
7.2.50.0090.00617.06
7.2.40.0040.01116.96
7.2.30.0050.00816.92
7.2.20.0040.01216.75
7.2.10.0050.01016.97
7.2.00.0040.00817.39
7.1.330.0160.00015.71
7.1.320.0120.00315.34
7.1.310.0130.00315.74
7.1.300.0070.00715.52
7.1.290.0040.00715.68
7.1.280.0100.00315.63
7.1.270.0060.00615.75
7.1.260.0030.01015.63
7.1.250.0060.00815.69
7.1.240.0110.00415.71
7.1.230.0060.00615.50
7.1.220.0090.00315.54
7.1.210.0090.00615.70
7.1.200.0080.00515.56
7.1.190.0060.00615.75
7.1.180.0030.01315.83
7.1.170.0040.01115.92
7.1.160.0070.00715.44
7.1.150.0060.00615.45
7.1.140.0070.00715.68
7.1.130.0040.01215.26
7.1.120.0030.00915.61
7.1.110.0100.00315.39
7.1.100.0080.00416.68
7.1.90.0070.01015.51
7.1.80.0070.00415.93
7.1.70.0040.00616.25
7.1.60.0060.01217.70
7.1.50.0090.00316.19
7.1.40.0070.00315.25
7.1.30.0110.00415.43
7.1.20.0090.00615.64
7.1.10.0080.00415.79
7.1.00.0030.04519.06
7.0.330.0070.00715.51
7.0.320.0060.00615.05
7.0.310.0030.01015.36
7.0.300.0030.00915.46
7.0.290.0120.00015.38
7.0.280.0000.00915.39
7.0.270.0060.00315.33
7.0.260.0000.00815.21
7.0.250.0070.00715.37
7.0.240.0000.01215.39
7.0.230.0060.00615.32
7.0.220.0040.00815.49
7.0.210.0000.01515.15
7.0.200.0040.00516.04
7.0.190.0110.00315.45
7.0.180.0150.00015.33
7.0.170.0060.00315.53
7.0.160.0030.01215.30
7.0.150.0090.00315.48
7.0.140.0040.04118.73
7.0.130.0000.00815.30
7.0.120.0110.00315.29
7.0.110.0100.02517.76
7.0.100.0050.02717.69
7.0.90.0090.02217.63
7.0.80.0120.02617.68
7.0.70.0200.02717.57
7.0.60.0260.04417.67
7.0.50.0200.02317.75
7.0.40.0080.04316.54
7.0.30.0070.03716.71
7.0.20.0100.04216.59
7.0.10.0070.03516.64
7.0.00.0060.04416.67
5.6.400.0080.00414.23
5.6.390.0030.00914.47
5.6.380.0030.01014.14
5.6.370.0000.01414.48
5.6.360.0070.00314.63
5.6.350.0030.01014.41
5.6.340.0040.01114.21
5.6.330.0000.01014.45
5.6.320.0030.00914.37
5.6.310.0080.00614.55
5.6.300.0060.00614.43
5.6.290.0110.00314.35
5.6.280.0030.04117.48
5.6.270.0050.00314.50
5.6.260.0020.02817.71
5.6.250.0050.03717.35
5.6.240.0020.03717.49
5.6.230.0020.04317.46
5.6.220.0050.04517.62
5.6.210.0080.02317.43
5.6.200.0060.03117.42
5.6.190.0060.02117.37
5.6.180.0050.04117.56
5.6.170.0050.04317.66
5.6.160.0050.03317.35
5.6.150.0060.04317.50
5.6.140.0130.03317.45
5.6.130.0060.04317.51
5.6.120.0110.04217.46
5.6.110.0070.04717.37
5.6.100.0100.02317.51
5.6.90.0050.02817.44
5.6.80.0030.03717.00
5.6.70.0080.04117.13
5.6.60.0080.04016.98
5.6.50.0070.04517.20
5.6.40.0070.04317.06
5.6.30.0030.04417.13
5.6.20.0080.04117.18
5.6.10.0070.04217.18
5.6.00.0130.03617.30
5.5.380.0030.04316.02
5.5.370.0020.02315.84
5.5.360.0050.03815.92
5.5.350.0060.04315.83
5.5.340.0010.04316.29
5.5.330.0050.02416.16
5.5.320.0050.03716.16
5.5.310.0050.04316.17
5.5.300.0070.04615.92
5.5.290.0070.04616.29
5.5.280.0120.02916.03
5.5.270.0130.04016.32
5.5.260.0020.04716.18
5.5.250.0050.05516.08
5.5.240.0020.04015.71
5.5.230.0090.03515.92
5.5.220.0050.02115.67
5.5.210.0070.03915.66
5.5.200.0090.04015.94
5.5.190.0070.04015.85
5.5.180.0120.03515.84
5.5.170.0100.00614.42
5.5.160.0080.02815.80
5.5.150.0030.02815.83
5.5.140.0120.02215.84
5.5.130.0050.04315.90
5.5.120.0080.02015.84
5.5.110.0070.03915.79
5.5.100.0110.04015.73
5.5.90.0060.02915.63
5.5.80.0070.03815.80
5.5.70.0060.03615.79
5.5.60.0070.04115.78
5.5.50.0030.03015.76
5.5.40.0080.04015.55
5.5.30.0080.04215.68
5.5.20.0020.02915.82
5.5.10.0050.04215.70
5.5.00.0030.04115.89
5.4.450.0070.03815.34
5.4.440.0120.03015.07
5.4.430.0050.03015.24
5.4.420.0080.02315.18
5.4.410.0050.02315.14
5.4.400.0030.04214.95
5.4.390.0100.03715.05
5.4.380.0060.04115.08
5.4.370.0080.02815.02
5.4.360.0020.04414.96
5.4.350.0020.04115.02
5.4.340.0090.04114.87
5.4.330.0030.00711.16
5.4.320.0060.02715.03
5.4.310.0050.03115.03
5.4.300.0080.03615.04
5.4.290.0000.04615.27
5.4.280.0040.03515.03
5.4.270.0050.03214.98
5.4.260.0080.04015.04
5.4.250.0080.04014.92
5.4.240.0040.03915.11
5.4.230.0060.04815.04
5.4.220.0000.04715.14
5.4.210.0050.03815.05
5.4.200.0080.04014.88
5.4.190.0060.03014.99
5.4.180.0050.04014.89
5.4.170.0080.04314.89
5.4.160.0030.02714.91
5.4.150.0130.03015.05
5.4.140.0050.03513.86
5.4.130.0030.03713.64
5.4.120.0080.04013.76
5.4.110.0070.03713.80
5.4.100.0050.03513.94
5.4.90.0070.02213.65
5.4.80.0050.02813.72
5.4.70.0060.02113.83
5.4.60.0100.03713.72
5.4.50.0050.03913.76
5.4.40.0110.03113.81
5.4.30.0080.04013.77
5.4.20.0050.02513.70
5.4.10.0020.04513.75
5.4.00.0070.03913.37
5.3.290.0050.04212.71
5.3.280.0050.03912.58
5.3.270.0070.04012.69
5.3.260.0090.03412.64
5.3.250.0050.03912.66
5.3.240.0030.04412.52
5.3.230.0020.02312.70
5.3.220.0040.04112.64
5.3.210.0120.03212.49
5.3.200.0020.04212.60
5.3.190.0050.02512.59
5.3.180.0130.02812.64
5.3.170.0010.04312.50
5.3.160.0050.04212.63
5.3.150.0050.03012.56
5.3.140.0050.04012.64
5.3.130.0070.03812.48
5.3.120.0050.04012.62
5.3.110.0090.04212.57
5.3.100.0070.03912.29
5.3.90.0060.02312.43
5.3.80.0070.03912.29
5.3.70.0100.03312.47
5.3.60.0020.02712.44
5.3.50.0090.03812.31
5.3.40.0070.03812.15
5.3.30.0020.04212.28
5.3.20.0060.03512.00
5.3.10.0020.03612.11
5.3.00.0030.02411.93
5.2.170.0000.06711.92
5.2.160.0100.03011.92
5.2.150.0070.03311.92
5.2.140.0000.04011.92
5.2.130.0030.03711.92
5.2.120.0070.06311.92
5.2.110.0100.05711.92
5.2.100.0070.05711.92
5.2.90.0100.05711.92
5.2.80.0100.05711.92
5.2.70.0070.06311.92
5.2.60.0000.04311.92
5.2.50.0070.06011.92
5.2.40.0070.06011.92
5.2.30.0000.05011.92
5.2.20.0070.05311.92
5.2.10.0030.03011.92
5.2.00.0070.05711.92
5.1.60.0070.04311.92
5.1.50.0100.04711.92
5.1.40.0070.04311.92
5.1.30.0070.05711.92
5.1.20.0070.05311.92
5.1.10.0100.04311.92
5.1.00.0000.05011.92
5.0.50.0070.03711.92
5.0.40.0070.01711.92
5.0.30.0000.03711.92
5.0.20.0030.02011.92
5.0.10.0030.04311.92
5.0.00.0070.06011.92
4.4.90.0070.03011.92
4.4.80.0030.01711.92
4.4.70.0030.03711.92
4.4.60.0070.02311.92
4.4.50.0000.03311.92
4.4.40.0030.04011.92
4.4.30.0070.01311.92
4.4.20.0070.02711.92
4.4.10.0030.03311.92
4.4.00.0000.02711.92
4.3.110.0000.02311.92
4.3.100.0030.03311.92
4.3.90.0030.03011.92
4.3.80.0030.03311.92
4.3.70.0030.03311.92
4.3.60.0000.03311.92
4.3.50.0000.02711.92
4.3.40.0030.05011.92
4.3.30.0000.03711.92
4.3.20.0070.01311.92
4.3.10.0000.02011.92
4.3.00.0030.03011.92

preferences:
36.46 ms | 400 KiB | 5 Q