3v4l.org

run code in 300+ PHP versions simultaneously
<?php class StaticA { public function setEmail($redirect) { $this->email = $redirect; } function dosomething(){ $obj = new static; $obj->email = $this->email; $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(){ $this->dosomething(); echo $this->email. "\n"; } function dosomething(){ echo "YOU SUCK AT PHOTOSHOP!"; echo parent::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.40.0070.00718.92
8.3.30.0140.00019.17
8.3.20.0000.00820.29
8.3.10.0030.00522.04
8.3.00.0000.00822.12
8.2.170.0090.00622.96
8.2.160.0030.01421.06
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00817.84
8.2.110.0070.00322.08
8.2.100.0000.01217.91
8.2.90.0080.00018.83
8.2.80.0000.00819.66
8.2.70.0030.00617.63
8.2.60.0080.00417.68
8.2.50.0060.00318.07
8.2.40.0040.00418.16
8.2.30.0070.00018.08
8.2.20.0030.00617.72
8.2.10.0040.00417.82
8.2.00.0050.00217.84
8.1.270.0080.00023.96
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00323.89
8.1.230.0080.00319.04
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0040.00417.53
8.1.180.0040.00418.10
8.1.170.0060.00318.50
8.1.160.0000.00721.97
8.1.150.0040.00418.58
8.1.140.0000.00817.39
8.1.130.0040.00417.77
8.1.120.0000.00817.42
8.1.110.0040.00417.54
8.1.100.0040.00417.39
8.1.90.0000.00717.35
8.1.80.0050.00317.48
8.1.70.0030.00317.38
8.1.60.0000.00817.63
8.1.50.0030.00617.56
8.1.40.0080.00017.59
8.1.30.0080.00017.70
8.1.20.0030.00617.60
8.1.10.0040.00417.59
8.1.00.0060.00317.50
8.0.300.0070.00018.77
8.0.290.0040.00417.18
8.0.280.0030.00318.45
8.0.270.0070.00017.28
8.0.260.0030.00316.90
8.0.250.0000.00717.01
8.0.240.0030.00617.03
8.0.230.0030.00317.03
8.0.220.0000.00716.84
8.0.210.0040.00416.89
8.0.200.0000.00617.06
8.0.190.0000.00717.00
8.0.180.0030.00516.89
8.0.170.0040.00417.02
8.0.160.0000.00916.88
8.0.150.0040.00816.83
8.0.140.0030.00616.90
8.0.130.0050.00013.41
8.0.120.0040.00416.96
8.0.110.0000.00816.88
8.0.100.0040.00416.80
8.0.90.0030.00517.04
8.0.80.0100.00316.87
8.0.70.0000.00816.87
8.0.60.0070.00016.75
8.0.50.0050.00316.84
8.0.30.0120.00617.04
8.0.20.0050.01417.40
8.0.10.0030.00516.98
8.0.00.0090.01316.84
7.4.330.0040.00415.00
7.4.320.0000.00616.63
7.4.300.0000.00816.59
7.4.290.0000.00716.66
7.4.280.0030.00516.63
7.4.270.0030.00316.48
7.4.260.0060.00316.56
7.4.250.0040.00416.50
7.4.240.0040.00316.43
7.4.230.0000.00716.53
7.4.220.0170.00016.63
7.4.210.0100.00616.59
7.4.200.0000.00816.36
7.4.190.0000.00716.69
7.4.160.0040.01216.47
7.4.150.0070.01017.40
7.4.140.0130.00817.86
7.4.130.0080.01016.59
7.4.120.0050.01216.50
7.4.110.0080.00816.46
7.4.100.0100.00716.55
7.4.90.0070.01016.72
7.4.80.0130.00319.39
7.4.70.0090.00616.61
7.4.60.0090.00916.64
7.4.50.0000.00816.45
7.4.40.0070.01022.77
7.4.30.0000.01616.64
7.4.00.0110.00614.73
7.3.330.0000.00513.32
7.3.320.0000.00513.37
7.3.310.0040.00416.25
7.3.300.0030.00316.36
7.3.290.0000.02116.39
7.3.280.0080.01016.36
7.3.270.0090.00817.40
7.3.260.0070.01616.41
7.3.250.0100.00816.54
7.3.240.0000.01716.58
7.3.230.0100.00616.39
7.3.210.0140.00316.53
7.3.200.0070.01119.39
7.3.190.0160.00616.43
7.3.180.0140.00316.38
7.3.170.0100.00616.50
7.3.160.0080.00816.61
7.3.120.0110.00514.70
7.3.110.0090.00614.90
7.3.100.0080.00814.75
7.3.90.0050.00514.88
7.3.80.0090.00314.92
7.3.70.0070.00714.81
7.3.60.0030.00914.71
7.3.50.0030.01414.59
7.3.40.0070.01014.89
7.3.30.0000.01114.81
7.3.20.0070.01016.71
7.3.10.0070.00716.57
7.3.00.0040.00716.48
7.2.330.0120.00616.73
7.2.320.0130.01016.79
7.2.310.0120.00416.80
7.2.300.0030.01316.62
7.2.290.0070.01016.84
7.2.250.0070.01114.99
7.2.240.0100.01015.12
7.2.230.0030.01214.96
7.2.220.0030.00915.08
7.2.210.0040.01215.21
7.2.200.0130.00015.26
7.2.190.0140.00315.01
7.2.180.0060.00615.00
7.2.170.0090.00614.77
7.2.130.0040.01016.86
7.2.120.0050.00616.97
7.2.110.0100.00716.81
7.2.100.0030.00816.97
7.2.90.0050.01216.82
7.2.80.0020.00817.07
7.2.70.0100.00617.04
7.2.60.0060.00816.87
7.2.50.0080.00716.86
7.2.40.0070.00516.89
7.2.30.0040.01016.83
7.2.20.0180.00516.99
7.2.10.0050.00917.02
7.2.00.0050.00817.62
7.1.330.0030.01015.48
7.1.320.0030.01215.58
7.1.310.0090.00615.69
7.1.300.0000.01515.65
7.1.290.0110.00015.54
7.1.280.0080.00415.59
7.1.270.0030.00715.64
7.1.260.0000.01415.33
7.1.250.0030.00815.68
7.1.200.0070.00715.83
7.1.100.0040.00818.06
7.1.70.0000.01217.03
7.1.60.0070.01719.82
7.1.50.0090.01216.77
7.1.00.0000.08022.28
7.0.200.0000.00716.74
7.0.140.0070.06322.00
7.0.60.0170.08019.94
7.0.50.0030.06317.91
7.0.40.0130.08019.97
7.0.30.0200.07720.09
7.0.20.0270.05320.19
7.0.10.0030.05720.23
7.0.00.0100.04720.08
5.6.280.0100.06720.79
5.6.210.0030.08020.70
5.6.200.0030.08718.21
5.6.190.0070.07720.77
5.6.180.0200.04720.69
5.6.170.0230.05320.39
5.6.160.0100.07720.46
5.6.150.0170.05018.16
5.6.140.0070.05318.23
5.6.130.0030.08018.14
5.6.120.0070.03721.00
5.6.110.0030.06020.90
5.6.100.0130.07720.99
5.6.90.0130.07020.96
5.6.80.0130.07020.38
5.6.70.4430.03320.38
5.5.350.0230.06320.43
5.5.340.0030.04318.05
5.5.330.0000.09020.43
5.5.320.0370.07320.28
5.5.310.0100.04720.34
5.5.300.0070.03717.98
5.5.290.0070.08018.04
5.5.280.0070.08320.89
5.5.270.0030.06320.77
5.5.260.0130.06720.74
5.5.250.0130.07320.56
5.5.240.0030.06320.37
5.4.450.0570.06719.20
5.4.440.0470.03719.55
5.4.430.0570.06019.40
5.4.420.0470.07019.26
5.4.410.0630.05319.43
5.4.400.0500.03719.15
5.4.390.0430.04019.06
5.4.380.0430.06319.00
5.4.370.0430.06319.09
5.4.360.0430.06719.20
5.4.350.0400.03319.09
5.4.340.0430.06718.98
5.4.320.0500.06319.09
5.4.310.0470.03319.02
5.4.300.0500.06019.21
5.4.290.0430.05019.22
5.4.280.0600.06318.85
5.4.270.0470.03319.13
5.4.260.0470.07018.89
5.4.250.0470.05318.97
5.4.240.0430.05019.19
5.4.230.0400.05019.21
5.4.220.0400.04719.06
5.4.210.0570.05718.97
5.4.200.0400.03018.84
5.4.190.0470.05719.00
5.4.180.0400.04019.12
5.4.170.0370.06319.31
5.4.160.0430.05019.13
5.4.150.0430.03719.18
5.4.140.0500.03016.57
5.4.130.0330.03716.38
5.4.120.0400.03716.37
5.4.110.0430.04016.42
5.4.100.0370.03316.50
5.4.90.0300.03716.24
5.4.80.0330.03316.58
5.4.70.0430.03716.62
5.4.60.0400.03016.43
5.4.50.0300.04016.43
5.4.40.0330.03716.43
5.4.30.0400.03316.51
5.4.20.0330.03716.53
5.4.10.0370.03316.43
5.4.00.0400.03015.96
5.3.290.0600.06714.76
5.3.280.0430.06714.54
5.3.270.0470.04714.63
5.3.260.0530.05014.52
5.3.250.0370.04014.73
5.3.240.0430.04014.51
5.3.230.0370.03314.53
5.3.220.0270.04314.65
5.3.210.0330.04014.69
5.3.200.0400.03314.55
5.3.190.0370.03714.48
5.3.180.0370.03314.54
5.3.170.0330.03714.65
5.3.160.0400.03314.59
5.3.150.0300.04014.59
5.3.140.0530.05714.64
5.3.130.0370.03314.57
5.3.120.0400.03014.54
5.3.110.0330.03714.57
5.3.100.0370.03313.97
5.3.90.0430.02713.95
5.3.80.0330.03714.25
5.3.70.0370.04314.19
5.3.60.0330.03714.18
5.3.50.0400.02714.07
5.3.40.0330.03713.96
5.3.30.0370.03713.92
5.3.20.0370.03313.86
5.3.10.0400.03013.76
5.3.00.0300.03713.73
5.2.170.0270.03011.75
5.2.160.0230.03311.75
5.2.150.0330.04711.75
5.2.140.0270.03011.75
5.2.130.0330.02311.75
5.2.120.0200.03311.75
5.2.110.0270.03011.75
5.2.100.0270.03011.75
5.2.90.0200.03311.75
5.2.80.0330.03011.75
5.2.70.0300.03311.75
5.2.60.0370.03711.75
5.2.50.0370.02711.75
5.2.40.0330.03711.75
5.2.30.0330.05011.75
5.2.20.0330.05011.75
5.2.10.0330.04711.75
5.2.00.0330.03711.75
5.1.60.0400.04011.75
5.1.50.0270.02711.75
5.1.40.0300.02311.75
5.1.30.0330.04711.75
5.1.20.0330.03311.75
5.1.10.0330.04711.75
5.1.00.0230.03011.75
5.0.50.0270.03311.75
5.0.40.0230.02711.75
5.0.30.0230.02311.75
5.0.20.0230.02011.75
5.0.10.0200.03711.75
5.0.00.0200.06011.75
4.4.90.0170.01711.75
4.4.80.0130.01711.75
4.4.70.0270.01311.75
4.4.60.0170.03311.75
4.4.50.0170.03311.75
4.4.40.0170.05011.75
4.4.30.0170.02011.75
4.4.20.0130.02711.75
4.4.10.0170.03311.75
4.4.00.0200.03711.75
4.3.110.0170.03311.75
4.3.100.0200.01311.75
4.3.90.0170.01311.75
4.3.80.0170.05011.75
4.3.70.0130.02311.75
4.3.60.0170.01311.75
4.3.50.0170.02011.75
4.3.40.0170.05011.75
4.3.30.0070.02311.75
4.3.20.0030.02311.75
4.3.10.0070.02011.75
4.3.00.0100.03311.75

preferences:
41.7 ms | 400 KiB | 5 Q