3v4l.org

run code in 300+ PHP versions simultaneously
<?phpabstract class parentTest{ protected $innerVar = ''; public function __construct() { if(empty($this->innerVar)){ echo 'too soon'; throw(new Exception('too soon')); } }}abstract class childTest extends parentTest{ protected $outerVar = ''; public function __construct() { if(empty($this->innerVar) || empty($this->outerVar)){ echo 'too soon'; throw(new Exception('too soon')); } }}class implTest extends parentTest{ protected $innerVar = 'hi';}class implChildTest extends childTest{ protected $innerVar = 'hi'; protected $outerVar = 'hello there';}new implTest();new implChildTest();<?php abstract class parentTest{ protected $innerVar;}class implTest{ protected $innerVar = 'hi'; public function __construct() { if(empty($this->innerVar)){ throw(new Exception('too soon')); } }}new implTest();

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.0150.00016.25
8.3.50.0100.01022.92
8.3.40.0140.00018.78
8.3.30.0030.01018.95
8.3.20.0090.00020.16
8.3.10.0000.00721.73
8.3.00.0050.00317.38
8.2.180.0090.00916.50
8.2.170.0100.00322.96
8.2.160.0100.00720.57
8.2.150.0000.00724.18
8.2.140.0050.00324.66
8.2.130.0080.00826.16
8.2.120.0040.00420.96
8.2.110.0040.01520.47
8.2.100.0120.00017.72
8.2.90.0000.00818.16
8.2.80.0100.00217.97
8.2.70.0040.00417.38
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0000.00818.03
8.2.30.0050.00318.00
8.2.20.0050.00317.58
8.2.10.0080.00017.99
8.2.00.0040.00417.44
8.1.280.0070.00725.92
8.1.270.0030.00523.96
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0080.00022.04
8.1.230.0110.00020.82
8.1.220.0040.00417.74
8.1.210.0000.00918.77
8.1.200.0060.00317.23
8.1.190.0050.00317.11
8.1.180.0040.00418.10
8.1.170.0050.00518.55
8.1.160.0040.00422.01
8.1.150.0040.00418.76
8.1.140.0000.00717.21
8.1.130.0030.00317.82
8.1.120.0000.00817.36
8.1.110.0040.00417.38
8.1.100.0050.00217.31
8.1.90.0030.00417.36
8.1.80.0040.00317.26
8.1.70.0070.00017.37
8.1.60.0030.00517.45
8.1.50.0030.00517.34
8.1.40.0040.00417.44
8.1.30.0060.00317.51
8.1.20.0000.00817.61
8.1.10.0000.00817.57
8.1.00.0000.00817.44
8.0.300.0000.00720.14
8.0.290.0000.00816.75
8.0.280.0000.00718.46
8.0.270.0030.00317.27
8.0.260.0030.00317.32
8.0.250.0080.00016.86
8.0.240.0000.00716.82
8.0.230.0030.00716.75
8.0.220.0030.00516.70
8.0.210.0060.00316.73
8.0.200.0040.00716.85
8.0.190.0030.00316.80
8.0.180.0000.00716.86
8.0.170.0080.00016.79
8.0.160.0040.00416.83
8.0.150.0070.00016.61
8.0.140.0000.00816.63
8.0.130.0000.00513.31
8.0.120.0080.00016.71
8.0.110.0000.00716.71
8.0.100.0030.00516.76
8.0.90.0040.00416.61
8.0.80.0150.00616.75
8.0.70.0040.00416.75
8.0.60.0080.00016.78
8.0.50.0040.00416.76
8.0.30.0050.01417.00
8.0.20.0100.00917.40
8.0.10.0000.00716.75
8.0.00.0100.00716.80
7.4.330.0050.00015.00
7.4.320.0030.00316.46
7.4.300.0060.00016.51
7.4.290.0040.00416.36
7.4.280.0040.00716.39
7.4.270.0030.00316.31
7.4.260.0050.00316.39
7.4.250.0030.00616.43
7.4.240.0040.00316.44
7.4.230.0030.00316.54
7.4.220.0060.01116.45
7.4.210.0060.00716.44
7.4.200.0000.00716.58
7.4.160.0070.00716.46
7.4.150.0030.01617.40
7.4.140.0070.01017.86
7.4.130.0030.01516.39
7.4.120.0110.00616.31
7.4.110.0100.00616.58
7.4.100.0030.01416.49
7.4.90.0100.00716.42
7.4.80.0100.01319.39
7.4.70.0120.00416.46
7.4.60.0090.00916.18
7.4.50.0060.00016.31
7.4.40.0150.00416.44
7.4.30.0060.00916.36
7.3.330.0000.00613.14
7.3.320.0000.00512.97
7.3.310.0070.00016.10
7.3.300.0030.00316.11
7.3.290.0090.00616.20
7.3.280.0080.01016.23
7.3.270.0120.00617.40
7.3.260.0070.01116.30
7.3.240.0090.00816.33
7.3.230.0090.00916.39
7.3.210.0110.00716.33
7.3.200.0070.01419.39
7.3.190.0090.00916.33
7.3.180.0150.00616.20
7.3.170.0120.00316.27
7.3.160.0090.00616.36
7.2.330.0120.00616.57
7.2.320.0250.02616.64
7.2.310.0030.01316.65
7.2.300.0120.00616.67
7.2.290.0060.01016.52
5.4.320.0040.03912.50
5.4.310.0060.03812.50
5.4.300.0070.03812.50
5.4.290.0110.04412.50
5.4.280.0070.03612.39
5.4.270.0100.03212.39
5.4.260.0030.04112.39
5.4.250.0070.03812.39
5.4.240.0050.03812.40
5.4.230.0070.04212.39
5.4.220.0050.03912.39
5.4.210.0040.03712.39
5.4.200.0060.03612.39
5.4.190.0070.04212.39
5.4.180.0030.03912.38
5.4.170.0060.03512.39
5.4.160.0060.03512.39
5.4.150.0040.04112.39
5.4.140.0060.03612.07
5.4.130.0080.03312.06
5.4.120.0070.03512.02
5.4.110.0040.03712.01
5.4.100.0030.03712.01
5.4.90.0080.03512.02
5.4.80.0060.03712.02
5.4.70.0070.03412.01
5.4.60.0080.04112.00
5.4.50.0030.03812.01
5.4.40.0070.03612.00
5.4.30.0060.03712.00
5.4.20.0050.03611.99
5.4.10.0050.03611.99
5.4.00.0070.03411.48
5.3.290.0040.04812.80
5.3.280.0020.04112.71
5.3.270.0060.03812.73
5.3.260.0070.04012.72
5.3.250.0080.03912.72
5.3.240.0040.03912.71
5.3.230.0070.03712.70
5.3.220.0100.03712.68
5.3.210.0060.04212.68
5.3.200.0060.03612.68
5.3.190.0060.03712.68
5.3.180.0030.04112.67
5.3.170.0080.03612.67
5.3.160.0100.03312.67
5.3.150.0060.03712.67
5.3.140.0040.04212.66
5.3.130.0040.04412.66
5.3.120.0100.03412.66
5.3.110.0070.03812.66
5.3.100.0050.03712.13
5.3.90.0030.03812.11
5.3.80.0070.03412.09
5.3.70.0080.03412.09
5.3.60.0060.03512.07
5.3.50.0060.03712.02
5.3.40.0050.03812.02
5.3.30.0030.03911.98
5.3.20.0050.03611.77
5.3.10.0070.03411.73
5.3.00.0090.03211.72
5.2.170.0030.0319.21
5.2.160.0030.0319.22
5.2.150.0030.0319.21
5.2.140.0060.0289.21
5.2.130.0050.0289.18
5.2.120.0040.0309.17
5.2.110.0070.0329.18
5.2.100.0070.0279.18
5.2.90.0070.0289.17
5.2.80.0040.0329.17
5.2.70.0060.0299.16
5.2.60.0070.0279.13
5.2.50.0060.0299.09
5.2.40.0060.0279.07
5.2.30.0060.0289.04
5.2.20.0060.0289.04
5.2.10.0030.0308.95
5.2.00.0040.0298.80
5.1.60.0040.0248.09
5.1.50.0040.0258.08
5.1.40.0070.0228.06
5.1.30.0020.0298.41
5.1.20.0020.0358.43
5.1.10.0040.0278.16
5.1.00.0060.0288.16
5.0.50.0060.0206.64
5.0.40.0060.0166.51
5.0.30.0020.0326.31
5.0.20.0030.0196.28
5.0.10.0020.0216.26
5.0.00.0040.0296.25
4.4.90.0050.0134.78
4.4.80.0050.0134.76
4.4.70.0020.0164.75
4.4.60.0000.0184.75
4.4.50.0030.0154.77
4.4.40.0030.0254.71
4.4.30.0030.0154.76
4.4.20.0050.0134.84
4.4.10.0020.0174.85
4.4.00.0030.0244.75
4.3.110.0030.0154.67
4.3.100.0050.0124.67
4.3.90.0020.0154.63
4.3.80.0050.0224.58
4.3.70.0030.0144.63
4.3.60.0030.0144.63
4.3.50.0020.0154.63
4.3.40.0030.0234.54
4.3.30.0020.0163.28
4.3.20.0010.0173.26
4.3.10.0010.0163.23
4.3.00.0070.02015.90

preferences:
45.03 ms | 401 KiB | 5 Q