3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); abstract class Base { protected $test = "123"; protected function doSomething() { echo 'here we go' . PHP_EOL; $this->test = "456"; echo $this->test . PHP_EOL; } } class Vendor extends Base { protected function doSomething() { // do something.. $this->test = "678"; // call parent (Base::doSomething()) parent::doSomething(); // do something more } } class Local extends Vendor { protected function doSomething() { $this->test = "1212"; // do something venture-specific // intention: call grand-parent (Base::doSomething()) parent::doSomething(); // this will call Vendor::doSomething() :( // this would work, without raising a strict error (see https://bugs.php.net/bug.php?id=42016 - not a bug!) Base::doSomething(); // a little more generic, but you need to know about inheritance level: $grandparent = get_parent_class(get_parent_class($this)); $grandparent::doSomething(); // do something more } public function api() { $this->doSomething(); } } $local = new Local; $local->api();

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.0100.01018.30
8.3.50.0250.00521.96
8.3.40.0140.00718.84
8.3.30.0060.00819.07
8.3.20.0000.00720.16
8.3.10.0050.00322.09
8.3.00.0050.00322.58
8.2.180.0120.00316.50
8.2.170.0140.00722.96
8.2.160.0160.00320.65
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.01026.16
8.2.120.0040.00419.35
8.2.110.0090.00022.18
8.2.100.0070.00717.78
8.2.90.0030.00619.08
8.2.80.0060.00317.97
8.2.70.0050.00317.50
8.2.60.0000.00817.92
8.2.50.0050.00318.07
8.2.40.0030.00618.28
8.2.30.0070.00018.05
8.2.20.0000.00817.72
8.2.10.0070.00017.66
8.2.00.0030.00617.51
8.1.280.0150.00625.92
8.1.270.0040.00422.06
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0030.00723.84
8.1.230.0090.00319.16
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0030.00617.48
8.1.190.0050.00317.29
8.1.180.0030.00518.74
8.1.170.0080.00018.51
8.1.160.0040.00422.03
8.1.150.0040.00418.64
8.1.140.0000.00817.38
8.1.130.0070.00017.86
8.1.120.0000.00717.52
8.1.110.0040.00417.44
8.1.100.0000.00817.46
8.1.90.0000.00817.41
8.1.80.0000.00717.36
8.1.70.0000.00717.44
8.1.60.0030.00617.59
8.1.50.0000.00817.53
8.1.40.0040.00417.52
8.1.30.0050.00317.65
8.1.20.0060.00317.59
8.1.10.0030.00517.52
8.1.00.0030.00517.45
8.0.300.0040.00418.77
8.0.290.0040.00417.05
8.0.280.0000.00718.45
8.0.270.0000.00717.29
8.0.260.0000.00716.74
8.0.250.0030.00316.84
8.0.240.0030.00316.85
8.0.230.0000.00716.84
8.0.220.0000.00716.93
8.0.210.0030.00316.86
8.0.200.0070.00016.79
8.0.190.0030.00516.87
8.0.180.0040.00416.93
8.0.170.0000.00916.94
8.0.160.0070.00016.79
8.0.150.0030.00516.72
8.0.140.0000.00716.72
8.0.130.0000.00513.30
8.0.120.0080.00016.84
8.0.110.0040.00416.86
8.0.100.0040.00416.90
8.0.90.0030.00616.91
8.0.80.0030.01416.91
8.0.70.0040.00416.89
8.0.60.0000.00716.86
8.0.50.0000.00716.71
8.0.30.0140.00716.99
8.0.20.0110.00817.41
8.0.10.0070.00016.93
8.0.00.0110.00616.67
7.4.330.0050.00015.08
7.4.320.0040.00416.46
7.4.300.0060.00016.52
7.4.290.0040.00416.61
7.4.280.0030.00316.42
7.4.270.0000.00716.65
7.4.260.0040.00416.63
7.4.250.0000.00816.47
7.4.240.0020.00516.58
7.4.230.0030.00316.58
7.4.220.0110.00716.66
7.4.210.0100.00616.65
7.4.200.0030.00316.63
7.4.190.0070.00016.46
7.4.160.0110.01416.40
7.4.150.0160.00717.40
7.4.140.0110.00617.86
7.4.130.0070.01116.46
7.4.120.0080.01016.49
7.4.110.0100.00716.36
7.4.100.0110.00716.36
7.4.90.0090.00916.51
7.4.80.0070.01319.39
7.4.70.0060.01016.55
7.4.60.0060.01616.59
7.4.50.0090.00016.24
7.4.40.0080.00322.77
7.4.30.0040.01416.36
7.4.00.0060.00914.81
7.3.330.0000.00713.15
7.3.320.0030.00313.34
7.3.310.0040.00416.22
7.3.300.0000.00716.23
7.3.290.0090.01216.34
7.3.280.0080.01016.35
7.3.270.0130.00317.40
7.3.260.0030.01316.34
7.3.250.0140.00716.43
7.3.240.0150.00716.60
7.3.230.0130.00316.39
7.3.210.0030.01516.77
7.3.200.0170.00019.39
7.3.190.0160.00316.64
7.3.180.0150.00316.35
7.3.170.0100.01116.39
7.3.160.0140.00316.52
7.3.120.0050.00915.00
7.3.110.0040.01114.87
7.3.100.0040.01114.85
7.3.90.0000.01514.70
7.3.80.0080.00815.07
7.3.70.0060.01014.66
7.3.60.0110.00314.92
7.3.50.0060.00314.74
7.3.40.0060.00614.93
7.3.30.0030.01214.96
7.3.20.0090.00316.45
7.3.10.0030.01016.58
7.3.00.0000.01616.50
7.2.330.0070.01016.76
7.2.320.0120.00616.61
7.2.310.0060.01616.80
7.2.300.0100.00716.71
7.2.290.0070.01016.53
7.2.250.0100.01014.92
7.2.240.0110.00715.01
7.2.230.0030.01415.36
7.2.220.0060.00315.02
7.2.210.0050.00514.89
7.2.200.0100.00614.81
7.2.190.0040.01115.03
7.2.180.0040.01115.05
7.2.170.0130.00614.94
7.2.00.0070.01119.41
7.1.330.0070.00715.54
7.1.320.0100.00315.98
7.1.310.0080.01215.67
7.1.300.0030.01015.52
7.1.290.0030.01415.96
7.1.280.0100.00615.44
7.1.270.0060.01215.88
7.1.260.0000.00915.91
7.1.100.0040.00717.87
7.1.70.0070.00417.38
7.1.60.0140.01119.82
7.1.50.0070.01417.11
7.1.00.0070.07322.33
7.0.200.0040.00916.64
7.0.140.0070.07022.11
7.0.80.0700.05719.99
7.0.70.0600.07019.89
7.0.60.0300.07719.97
7.0.50.0570.07320.31
7.0.40.0100.05019.99
7.0.30.0100.04720.05
7.0.20.0030.09020.09
7.0.10.0170.06020.04
7.0.00.0130.08020.04
5.6.280.0070.07020.93
5.6.230.0170.07720.67
5.6.220.0130.06720.59
5.6.210.0030.08320.67
5.6.200.0000.09720.97
5.6.190.0070.09021.14
5.6.180.0070.07321.07
5.6.170.0170.08021.05
5.6.160.0030.06020.96
5.6.150.0070.07021.03
5.6.140.0070.06021.12
5.6.130.0100.08020.97
5.6.120.0100.06021.05
5.6.110.0070.07721.04
5.6.100.0100.08320.95
5.6.90.0070.07021.02
5.6.80.0070.07720.34
5.6.70.0070.07020.34
5.6.60.0100.08020.32
5.6.50.0030.08720.48
5.6.40.0030.06720.41
5.6.30.0130.05320.36
5.6.20.0100.08020.34
5.6.10.0030.08020.50
5.6.00.0130.07020.38
5.5.370.0170.07320.46
5.5.360.0100.08720.34
5.5.350.0070.08020.43
5.5.340.0170.07720.92
5.5.330.0030.07020.89
5.5.320.0130.06020.85
5.5.310.0100.07720.66
5.5.300.0030.08720.91
5.5.290.0070.08320.89
5.5.280.0030.04320.62
5.5.270.0000.08720.89
5.5.260.0170.07720.93
5.5.250.0170.04720.65
5.5.240.0130.07320.23
5.5.230.0070.07020.31
5.5.220.0130.03720.30
5.5.210.0170.07720.07
5.5.200.0100.06720.20
5.5.190.0170.06719.98
5.5.180.0070.08320.29
5.5.160.0100.07320.23
5.5.150.0130.07020.13
5.5.140.0030.05720.26
5.5.130.0100.07720.27
5.5.120.0070.05020.25
5.5.110.0030.08020.19
5.5.100.0130.07019.97
5.5.90.0100.06720.09
5.5.80.0100.07319.96
5.5.70.0170.06719.98
5.5.60.0030.07320.13
5.5.50.0070.07720.16
5.5.40.0100.06320.07
5.5.30.0030.06720.06
5.5.20.0030.05020.09
5.5.10.0000.08720.12
5.5.00.0130.06020.09
5.4.450.0030.05019.45
5.4.440.0100.04719.37
5.4.430.0100.07719.22
5.4.420.0070.07319.27
5.4.410.0000.04719.29
5.4.400.0130.06019.09
5.4.390.0100.07319.13
5.4.380.0070.05018.85
5.4.370.0100.07318.85
5.4.360.0170.06718.90
5.4.350.0070.06719.12
5.4.340.0130.07019.13
5.4.320.0070.07719.14
5.4.310.0030.08318.88
5.4.300.0130.06718.90
5.4.290.0070.05718.89
5.4.280.0030.08019.13
5.4.270.0030.04719.18
5.4.260.0070.05319.04
5.4.250.0070.07319.20
5.4.240.0000.05319.20
5.4.230.0100.06319.02
5.4.220.0130.07318.87
5.4.210.0030.05319.03
5.4.200.0130.06719.04
5.4.190.0070.04719.04
5.4.180.0030.08019.02
5.4.170.0170.07019.19
5.4.160.0070.06019.17
5.4.150.0070.07318.85
5.4.140.0100.07316.31
5.4.130.0170.05716.45
5.4.120.0070.07716.38
5.4.110.0070.04716.53
5.4.100.0130.06716.56
5.4.90.0130.06016.45
5.4.80.0030.07316.40
5.4.70.0100.07016.52
5.4.60.0000.06316.25
5.4.50.0070.04716.45
5.4.40.0100.06716.29
5.4.30.0100.04016.51
5.4.20.0070.05016.45
5.4.10.0100.06016.24
5.4.00.0070.06316.12
5.3.290.0000.05016.12
5.3.280.0100.07316.12
5.3.270.0070.07316.12
5.3.260.0100.04316.12
5.3.250.0000.08016.12
5.3.240.0000.08716.12
5.3.230.0100.07716.12
5.3.220.0030.07716.12
5.3.210.0100.07016.12
5.3.200.0030.07716.12
5.3.190.0170.04716.12
5.3.180.0100.07016.12
5.3.170.0070.06716.12
5.3.160.0100.07716.12
5.3.150.0130.06716.12
5.3.140.0170.05016.12
5.3.130.0100.07316.12
5.3.120.0070.05016.12
5.3.110.0130.07316.12
5.3.100.0000.04316.12
5.3.90.0030.06716.12
5.3.80.0100.06316.12
5.3.70.0100.07016.12
5.3.60.0070.07716.12
5.3.50.0070.06316.12
5.3.40.0070.05316.12
5.3.30.0030.05716.12
5.3.20.0070.05716.12
5.3.10.0100.05716.12
5.3.00.0100.07016.12
5.2.170.0100.05316.12
5.2.160.0030.06016.12
5.2.150.0130.05316.12
5.2.140.0070.04316.12
5.2.130.0030.03016.12
5.2.120.0130.03716.12
5.2.110.0100.05716.12
5.2.100.0100.05316.12
5.2.90.0100.05716.12
5.2.80.0100.05716.12
5.2.70.0030.06316.12
5.2.60.0030.06716.12
5.2.50.0030.05316.12
5.2.40.0100.05716.12
5.2.30.0070.05716.12
5.2.20.0100.02716.12
5.2.10.0070.04016.12
5.2.00.0070.02316.12
5.1.60.0030.05716.12
5.1.50.0030.05316.12
5.1.40.0070.05016.12
5.1.30.0030.05716.12
5.1.20.0030.05016.12
5.1.10.0070.04016.12
5.1.00.0030.03316.12
5.0.50.0030.05016.12
5.0.40.0070.03716.12
5.0.30.0030.06316.12
5.0.20.0030.04316.12
5.0.10.0100.04016.12
5.0.00.0030.05316.12
4.4.90.0030.03716.12
4.4.80.0000.03016.12
4.4.70.0000.02316.12
4.4.60.0030.03716.12
4.4.50.0000.02316.12
4.4.40.0000.03716.12
4.4.30.0030.03716.12
4.4.20.0030.03316.12
4.4.10.0000.03716.12
4.4.00.0030.04016.12
4.3.110.0030.01716.12
4.3.100.0030.03316.12
4.3.90.0030.03316.12
4.3.80.0000.02716.12
4.3.70.0030.01716.12
4.3.60.0000.04316.12
4.3.50.0000.03716.12
4.3.40.0000.03716.12
4.3.30.0000.03016.12
4.3.20.0000.04016.12
4.3.10.0000.02716.12
4.3.00.0000.03716.12

preferences:
38.6 ms | 401 KiB | 5 Q