3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); 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.0060.01318.23
8.3.50.0080.01117.45
8.3.40.0060.00918.84
8.3.30.0090.00618.39
8.3.20.0060.00318.66
8.3.10.0000.00820.28
8.3.00.0050.00317.59
8.2.180.0070.01418.29
8.2.170.0030.01422.96
8.2.160.0040.01122.30
8.2.150.0040.01524.18
8.2.140.0080.00024.66
8.2.130.0140.00426.16
8.2.120.0000.00819.77
8.2.110.0080.00022.10
8.2.100.0050.00517.91
8.2.90.0050.00317.75
8.2.80.0060.00317.97
8.2.70.0040.00418.03
8.2.60.0030.00618.03
8.2.50.0040.00419.50
8.2.40.0000.00720.30
8.2.30.0050.00318.05
8.2.20.0040.00417.68
8.2.10.0090.00017.56
8.2.00.0060.00317.49
8.1.280.0090.00625.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.01423.92
8.1.230.0030.00719.21
8.1.220.0060.00317.74
8.1.210.0000.00918.77
8.1.200.0000.00817.35
8.1.190.0030.00517.25
8.1.180.0040.00418.10
8.1.170.0050.00318.65
8.1.160.0040.00418.88
8.1.150.0040.00418.55
8.1.140.0040.00417.36
8.1.130.0030.00317.90
8.1.120.0000.00717.48
8.1.110.0030.00517.52
8.1.100.0030.00517.53
8.1.90.0040.00417.46
8.1.80.0030.00517.37
8.1.70.0000.00717.42
8.1.60.0080.00017.62
8.1.50.0050.00217.48
8.1.40.0000.00817.49
8.1.30.0060.00317.55
8.1.20.0040.00417.67
8.1.10.0000.00817.49
8.1.00.0040.00417.48
8.0.300.0000.00819.64
8.0.290.0050.00516.63
8.0.280.0040.00418.51
8.0.270.0040.00417.20
8.0.260.0050.00316.74
8.0.250.0060.00316.94
8.0.240.0000.00916.86
8.0.230.0000.00716.95
8.0.220.0030.00316.90
8.0.210.0030.00316.89
8.0.200.0000.00616.85
8.0.190.0050.00216.93
8.0.180.0050.00216.93
8.0.170.0000.00816.97
8.0.160.0000.00716.92
8.0.150.0050.00316.77
8.0.140.0030.00916.76
8.0.130.0000.00513.32
8.0.120.0050.00216.86
8.0.110.0000.00716.84
8.0.100.0020.00516.82
8.0.90.0000.00717.01
8.0.80.0030.01716.89
8.0.70.0000.00716.71
8.0.60.0000.00816.79
8.0.50.0070.00016.72
8.0.30.0130.00917.01
8.0.20.0180.00617.11
8.0.10.0040.00416.98
8.0.00.0030.01916.83
7.4.330.0000.00612.83
7.4.320.0030.00316.41
7.4.300.0000.00616.41
7.4.290.0000.00816.50
7.4.280.0070.00316.48
7.4.270.0000.00716.66
7.4.260.0050.00013.29
7.4.250.0070.00016.62
7.4.240.0040.00416.57
7.4.230.0040.00416.70
7.4.220.0070.01116.45
7.4.210.0090.01016.60
7.4.200.0030.00316.44
7.4.190.0000.00716.70
7.4.160.0090.01216.52
7.4.150.0140.00416.36
7.4.140.0030.01416.57
7.4.130.0120.00916.38
7.4.120.0090.00816.51
7.4.110.0070.01116.45
7.4.100.0100.00716.42
7.4.90.0130.00916.68
7.4.80.0030.01516.34
7.4.70.0120.00616.30
7.4.60.0060.01016.54
7.4.50.0060.00016.46
7.4.40.0070.00716.38
7.4.30.0070.01316.42
7.4.00.0070.00715.02
7.3.330.0060.00013.34
7.3.320.0000.00513.33
7.3.310.0000.00716.26
7.3.300.0030.00316.41
7.3.290.0030.01016.33
7.3.280.0100.00716.38
7.3.270.0060.01016.68
7.3.260.0140.00716.40
7.3.250.0040.01516.47
7.3.240.0210.00316.68
7.3.230.0140.00416.77
7.3.210.0110.00516.59
7.3.200.0060.01819.39
7.3.190.0050.01516.43
7.3.180.0130.00316.36
7.3.170.0030.01716.57
7.3.160.0120.00316.35
7.3.120.0030.01015.06
7.2.330.0150.00316.69
7.2.320.0100.01316.49
7.2.310.0100.01316.74
7.2.300.0060.01316.32
7.2.290.0120.00416.46
7.2.00.0030.00619.52
7.1.100.0030.00618.07
7.1.70.0000.00717.11
7.1.60.0110.01519.40
7.1.50.0060.01316.85
7.1.00.0070.07322.54
7.0.200.0000.00716.94
7.0.140.0030.07321.95
7.0.120.0100.06722.05
7.0.60.0000.08719.92
7.0.50.0030.05717.98
7.0.40.0070.05720.27
7.0.30.0530.07720.18
7.0.20.0270.05320.06
7.0.10.0270.07320.10
7.0.00.0000.05020.18
5.6.280.0100.06721.14
5.6.210.0030.08320.57
5.6.200.0070.07318.25
5.6.190.0170.06720.61
5.6.180.0070.04720.48
5.6.170.0370.07720.41
5.6.160.0070.07020.55
5.6.150.0000.04018.29
5.6.140.0130.07318.12
5.6.130.0070.07718.15
5.6.120.0100.07321.00
5.6.110.0130.08021.10
5.6.100.0070.08720.97
5.6.90.0000.04320.89
5.6.80.0130.06720.38
5.6.70.0100.08020.53
5.5.350.0200.07720.40
5.5.340.0130.07717.97
5.5.330.0170.07320.13
5.5.320.0400.03320.34
5.5.310.0270.08020.23
5.5.300.0070.06318.00
5.5.290.0070.04017.95
5.5.280.0100.07320.98
5.5.270.0000.07020.98
5.5.260.0100.07720.75
5.5.250.0000.09320.60
5.5.240.0070.07020.29
5.4.450.0370.04019.57
5.4.440.3670.04719.20
5.4.430.0100.06019.63
5.4.420.0170.05019.55
5.4.410.0100.05719.27
5.4.400.0100.05319.36
5.4.390.0100.05319.06
5.4.380.0300.04318.74
5.4.370.0030.04318.60
5.4.360.0170.04318.61
5.4.350.0070.04412.03
5.4.340.0070.03912.03
5.4.320.0050.03712.52
5.4.310.0070.03812.51
5.4.300.0070.04012.51
5.4.290.0070.03812.50
5.4.280.0050.03712.40
5.4.270.0070.03812.40
5.4.260.0050.04112.40
5.4.250.0070.04412.40
5.4.240.0070.04912.40
5.4.230.0080.03912.40
5.4.220.0070.03712.39
5.4.210.0060.03612.39
5.4.200.0060.04112.39
5.4.190.0070.03812.39
5.4.180.0060.03812.39
5.4.170.0040.03912.40
5.4.160.0060.03712.40
5.4.150.0070.03712.39
5.4.140.0080.03812.08
5.4.130.0080.04112.07
5.4.120.0070.04012.02
5.4.110.0070.03612.02
5.4.100.0070.03512.02
5.4.90.0050.04212.02
5.4.80.0070.03812.02
5.4.70.0070.03612.02
5.4.60.0060.03512.01
5.4.50.0050.03712.02
5.4.40.0050.03612.00
5.4.30.0050.04012.00
5.4.20.0080.03512.00
5.4.10.0070.03512.00
5.4.00.0080.03711.49
5.3.290.0050.04012.80
5.3.280.0070.03812.71
5.3.270.0060.04112.73
5.3.260.0060.04312.72
5.3.250.0050.04212.72
5.3.240.0070.04212.72
5.3.230.0070.03912.71
5.3.220.0070.03912.68
5.3.210.0080.04412.68
5.3.200.0060.03812.68
5.3.190.0060.04012.68
5.3.180.0060.03912.68
5.3.170.0060.04212.67
5.3.160.0060.04412.67
5.3.150.0080.04312.67
5.3.140.0110.04412.66
5.3.130.0070.04712.66
5.3.120.0050.04612.66
5.3.110.0060.04212.66
5.3.100.0090.03712.13
5.3.90.0080.04112.11
5.3.80.0060.03812.10
5.3.70.0070.03812.10
5.3.60.0060.03912.08
5.3.50.0070.03712.03
5.3.40.0060.04012.03

preferences:
38.45 ms | 401 KiB | 5 Q