3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); abstract class Base { protected function doSomething() { echo 'here we go' . PHP_EOL; $something = 'aaaaaa'; return $something; } } class Vendor extends Base { protected function doSomething() { // do something.. // call parent (Base::doSomething()) $something = parent::doSomething(); $something .= "bbbbbbbbbbb"; return $something; // do something more } } class Local extends Vendor { protected function doSomething() { // do something venture-specific // skip Vendor $grandparent = get_parent_class(get_parent_class($this)); $something = $grandparent::doSomething(); $something .= "cccccccccccc"; return $something; // do something more // 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() { $something = $this->doSomething(); echo $something; } } $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.0030.01716.88
8.3.50.0220.00916.63
8.3.40.0070.01018.59
8.3.30.0040.01118.67
8.3.20.0040.00418.60
8.3.10.0040.00420.41
8.3.00.0040.00417.63
8.2.180.0070.01016.75
8.2.170.0110.00422.96
8.2.160.0090.00422.05
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0050.00226.16
8.2.120.0060.00319.78
8.2.110.0040.00722.08
8.2.100.0040.00817.99
8.2.90.0000.00819.11
8.2.80.0000.00818.16
8.2.70.0000.00817.49
8.2.60.0040.00418.03
8.2.50.0000.00818.22
8.2.40.0030.00620.45
8.2.30.0000.00719.19
8.2.20.0000.00717.64
8.2.10.0080.00017.73
8.2.00.0070.00417.75
8.1.280.0140.00425.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00322.73
8.1.230.0070.00319.10
8.1.220.0030.00517.74
8.1.210.0000.01018.77
8.1.200.0060.00317.35
8.1.190.0040.00717.11
8.1.180.0060.00319.15
8.1.170.0050.00318.57
8.1.160.0000.00818.87
8.1.150.0040.00422.09
8.1.140.0000.00717.44
8.1.130.0030.00317.82
8.1.120.0040.00417.25
8.1.110.0030.00517.39
8.1.100.0040.00417.41
8.1.90.0050.00217.29
8.1.80.0040.00417.30
8.1.70.0030.00617.33
8.1.60.0040.00417.48
8.1.50.0000.00817.45
8.1.40.0000.00717.54
8.1.30.0040.00417.66
8.1.20.0050.00317.61
8.1.10.0040.00417.53
8.1.00.0030.00517.56
8.0.300.0040.00418.77
8.0.290.0040.00416.73
8.0.280.0050.00218.36
8.0.270.0030.00317.26
8.0.260.0050.00316.82
8.0.250.0040.00416.96
8.0.240.0040.00716.85
8.0.230.0000.00716.89
8.0.220.0030.00316.72
8.0.210.0000.00716.71
8.0.200.0030.00316.89
8.0.190.0070.00016.93
8.0.180.0050.00216.91
8.0.170.0060.00316.82
8.0.160.0030.00516.86
8.0.150.0000.00816.88
8.0.140.0090.00016.80
8.0.130.0050.00013.35
8.0.120.0070.00016.80
8.0.110.0040.00416.80
8.0.100.0050.00316.70
8.0.90.0000.00716.77
8.0.80.0060.00916.85
8.0.70.0040.00416.77
8.0.60.0000.00716.74
8.0.50.0000.00716.80
8.0.30.0070.01217.22
8.0.20.0110.01317.07
8.0.10.0040.00416.81
8.0.00.0080.01116.72
7.4.330.0050.00012.79
7.4.320.0000.00716.41
7.4.300.0070.00016.50
7.4.290.0040.00416.53
7.4.280.0030.00616.51
7.4.270.0060.00016.65
7.4.260.0050.00013.28
7.4.250.0030.00616.57
7.4.240.0000.00716.54
7.4.230.0030.00316.51
7.4.220.0150.01216.70
7.4.210.0090.00616.55
7.4.200.0070.00016.40
7.4.190.0000.00716.75
7.4.160.0070.01016.44
7.4.150.0100.00716.40
7.4.140.0140.00316.62
7.4.130.0110.00816.52
7.4.120.0070.01116.62
7.4.110.0160.00716.39
7.4.100.0130.01016.53
7.4.90.0070.01716.50
7.4.80.0090.01116.39
7.4.70.0100.00616.36
7.4.60.0040.01516.42
7.4.50.0000.00516.43
7.4.40.0060.00916.34
7.4.30.0080.01216.55
7.4.10.0070.01014.94
7.4.00.0080.00715.15
7.3.330.0000.00613.22
7.3.320.0030.00313.27
7.3.310.0000.00616.32
7.3.300.0030.00316.21
7.3.290.0140.00716.28
7.3.280.0100.00816.23
7.3.270.0140.00616.19
7.3.260.0080.01516.33
7.3.250.0100.01216.39
7.3.240.0070.01016.50
7.3.230.0090.01116.59
7.3.210.0090.00916.55
7.3.200.0150.01119.39
7.3.190.0350.00516.29
7.3.180.0060.01316.47
7.3.170.0030.01316.60
7.3.160.0070.01116.52
7.3.130.0090.00914.98
7.3.120.0030.01114.85
7.3.110.0120.00914.89
7.3.100.0070.00714.80
7.3.90.0060.00614.68
7.3.80.0030.01015.04
7.3.70.0000.01214.61
7.3.60.0040.00714.76
7.3.50.0060.00614.96
7.3.40.0080.00414.51
7.3.30.0070.00714.69
7.3.20.0000.01416.60
7.3.10.0060.00316.56
7.3.00.0090.00316.69
7.2.330.0040.01516.53
7.2.320.0100.00716.41
7.2.310.0040.02116.80
7.2.300.0110.00616.71
7.2.290.0030.01416.79
7.2.260.0170.00314.55
7.2.250.0090.00615.01
7.2.240.0030.01215.04
7.2.230.0070.00714.99
7.2.220.0100.00614.89
7.2.210.0060.00614.83
7.2.200.0070.00714.97
7.2.190.0000.01114.82
7.2.180.0040.00715.13
7.2.170.0120.00415.13
7.2.160.0100.00714.87
7.2.150.0030.01016.87
7.2.140.0060.00816.71
7.2.130.0040.01116.96
7.2.120.0090.00616.87
7.2.110.0080.00616.87
7.2.100.0030.01216.66
7.2.90.0000.01416.95
7.2.80.0040.01116.98
7.2.70.0000.01516.94
7.2.60.0040.01416.74
7.2.50.0030.01016.91
7.2.40.0030.00916.89
7.2.30.0080.00816.95
7.2.20.0030.00717.02
7.2.10.0040.00816.95
7.2.00.0070.00718.07
7.1.330.0070.00716.05
7.1.320.0030.01415.90
7.1.310.0030.01315.42
7.1.300.0040.00715.89
7.1.290.0000.01115.84
7.1.280.0000.01215.70
7.1.270.0090.00915.50
7.1.260.0070.00415.88
7.1.250.0000.01116.09
7.1.240.0100.00315.93
7.1.230.0060.00915.80
7.1.220.0110.00015.65
7.1.210.0070.00715.77
7.1.200.0070.00715.88
7.1.190.0040.00815.81
7.1.180.0000.01315.77
7.1.170.0040.00815.87
7.1.160.0000.01015.79
7.1.150.0040.01015.80
7.1.140.0070.00315.84
7.1.130.0030.01015.93
7.1.120.0070.00715.95
7.1.110.0080.00415.69
7.1.100.0030.00617.02
7.1.90.0030.00915.68
7.1.80.0070.00715.92
7.1.70.0050.00716.55
7.1.60.0080.00917.65
7.1.50.0030.01316.50
7.1.40.0080.00415.91
7.1.30.0080.00415.88
7.1.20.0030.01215.79
7.1.10.0030.01015.98
7.1.00.0050.04219.11
7.0.330.0080.00015.61
7.0.320.0000.01415.53
7.0.310.0070.00715.50
7.0.300.0040.00815.21
7.0.290.0070.01015.27
7.0.280.0000.00915.43
7.0.270.0060.00615.46
7.0.260.0060.00315.43
7.0.250.0070.00315.64
7.0.240.0060.01015.56
7.0.230.0040.00715.33
7.0.220.0070.00715.50
7.0.210.0060.00615.21
7.0.200.0150.00715.25
7.0.190.0080.00015.50
7.0.180.0070.00315.55
7.0.170.0070.00315.29
7.0.160.0000.01415.23
7.0.150.0000.01115.10
7.0.140.0070.03818.83
7.0.130.0070.00415.25
7.0.120.0050.03718.76
7.0.110.0000.00915.34
7.0.100.0030.00615.22
7.0.90.0070.00715.43
7.0.80.0040.00715.30
7.0.70.0060.00615.47
7.0.60.0070.04417.73
7.0.50.0100.02716.72
7.0.40.0020.03716.91
7.0.30.0170.03816.91
7.0.20.0130.02916.89
7.0.10.0100.04616.82
7.0.00.0050.02716.76
5.6.400.0040.01114.69
5.6.390.0000.01214.45
5.6.380.0070.00714.44
5.6.370.0060.00914.46
5.6.360.0030.01014.43
5.6.350.0030.01314.20
5.6.340.0000.01414.18
5.6.330.0000.01614.25
5.6.320.0000.01214.59
5.6.310.0030.01014.74
5.6.300.0060.00614.39
5.6.290.0040.01114.30
5.6.280.0050.04017.78
5.6.270.0040.00714.46
5.6.260.0030.00914.54
5.6.250.0000.01314.36
5.6.240.0120.00314.27
5.6.230.0060.00614.37
5.6.220.0090.00614.43
5.6.210.0100.02017.50
5.6.200.0110.03616.25
5.6.190.0060.02617.34
5.6.180.0180.02517.42
5.6.170.0150.04217.47
5.6.160.0050.04117.53
5.6.150.0120.04216.35
5.6.140.0020.02916.21
5.6.130.0050.02616.25
5.6.120.0070.04717.73
5.6.110.0090.04017.61
5.6.100.0070.04617.65
5.6.90.0020.04217.66
5.6.80.0080.03617.32
5.6.70.0060.01014.49
5.6.60.0080.00414.16
5.6.50.0070.00714.21
5.6.40.0000.01714.13
5.6.30.0000.01114.37
5.6.20.0030.00514.41
5.6.10.0060.00614.21
5.6.00.0030.01314.19
5.5.380.0030.00914.28
5.5.370.0080.00414.43
5.5.360.0110.00314.51
5.5.350.0200.03617.31
5.5.340.0080.04115.98
5.5.330.0080.02717.24
5.5.320.0070.03217.26
5.5.310.0140.02517.50
5.5.300.0090.03716.17
5.5.290.0030.03516.30
5.5.280.0120.04517.55
5.5.270.0070.04517.50
5.5.260.0070.02917.32
5.5.250.0100.02017.59
5.5.240.0030.02017.13
5.5.230.0030.00914.19
5.5.220.0040.01114.01
5.5.210.0100.00314.24
5.5.200.0000.01414.14
5.5.190.0000.01114.38
5.5.180.0120.00014.15
5.5.170.0060.00614.00
5.5.160.0080.00414.38
5.5.150.0040.00714.28
5.5.140.0040.00914.29
5.5.130.0000.01614.38
5.5.120.0030.01214.20
5.5.110.0080.00814.41
5.5.100.0060.00914.35
5.5.90.0120.00614.37
5.5.80.0060.00914.11
5.5.70.0060.00314.12
5.5.60.0030.01014.29
5.5.50.0100.00014.33
5.5.40.0060.00614.41
5.5.30.0060.00614.10
5.5.20.0000.01114.12
5.5.10.0090.00314.61
5.5.00.0000.01314.27
5.4.450.0080.03815.26
5.4.440.0050.04315.24
5.4.430.0050.03815.44
5.4.420.0040.02715.22
5.4.410.0030.02415.16
5.4.400.0100.04015.18
5.4.390.0090.03515.03
5.4.380.0030.04315.24
5.4.370.0080.02815.10
5.4.360.0070.04415.14
5.4.350.0070.03014.86
5.4.340.0050.03915.03
5.4.330.0040.00810.93
5.4.320.0050.02315.18
5.4.310.0070.04015.01
5.4.300.0060.01815.08
5.4.290.0070.04315.13
5.4.280.0040.03115.20
5.4.270.0090.02015.23
5.4.260.0030.02315.07
5.4.250.0060.02815.21
5.4.240.0050.02515.12
5.4.230.0030.04215.13
5.4.220.0070.03715.15
5.4.210.0080.02515.02
5.4.200.0090.04015.24
5.4.190.0030.03914.95
5.4.180.0100.03415.04
5.4.170.0080.02815.12
5.4.160.0050.02515.04
5.4.150.0020.02715.15
5.4.140.0090.02113.80
5.4.130.0070.04113.78
5.4.120.0030.02513.73
5.4.110.0080.02013.97
5.4.100.0030.04213.80
5.4.90.0030.02513.84
5.4.80.0020.02513.86
5.4.70.0030.02213.82
5.4.60.0050.03513.80
5.4.50.0080.02013.75
5.4.40.0020.03013.88
5.4.30.0050.04113.77
5.4.20.0020.02213.68
5.4.10.0080.03213.72
5.4.00.0020.02113.53
5.3.290.0030.02312.81
5.3.280.0050.04012.81
5.3.270.0080.01812.81
5.3.260.0050.02712.68
5.3.250.0080.03212.74
5.3.240.0070.02312.76
5.3.230.0030.04212.69
5.3.220.0050.02112.72
5.3.210.0030.04612.72
5.3.200.0050.02612.75
5.3.190.0090.04212.72
5.3.180.0030.03912.79
5.3.170.0030.02312.74
5.3.160.0120.02012.71
5.3.150.0030.02512.74
5.3.140.0060.01812.71
5.3.130.0050.03512.74
5.3.120.0060.02212.72
5.3.110.0030.02612.67
5.3.100.0080.03712.47
5.3.90.0050.02812.47
5.3.80.0080.03812.46
5.3.70.0080.02012.45
5.3.60.0110.02712.46
5.3.50.0050.02412.41
5.3.40.0070.03512.41
5.3.30.0060.03912.38
5.3.20.0020.02912.24
5.3.10.0080.03512.30
5.3.00.0080.02812.27
5.2.170.0070.06311.21
5.2.160.0100.05011.15
5.2.150.0100.05711.09
5.2.140.0030.06311.31
5.2.130.0100.05711.15
5.2.120.0000.03311.19
5.2.110.0070.06011.11
5.2.100.0070.03011.26
5.2.90.0100.05311.00
5.2.80.0070.05711.03
5.2.70.0030.03311.15
5.2.60.0030.03011.11
5.2.50.0030.03011.03
5.2.40.0100.05311.17
5.2.30.0030.03010.98
5.2.20.0070.02711.02
5.2.10.0100.05310.90
5.2.00.0130.04310.88
5.1.60.0000.0339.90
5.1.50.0030.0279.96
5.1.40.0030.05310.04
5.1.30.0000.05010.31
5.1.20.0000.04010.32
5.1.10.0030.03710.07
5.1.00.0030.04710.00
5.0.50.0000.0238.53
5.0.40.0070.0178.46
5.0.30.0030.0308.28
5.0.20.0030.0378.28
5.0.10.0070.0208.28
5.0.00.0000.0738.31
4.4.90.0000.0278.28
4.4.80.0030.0278.28
4.4.70.0070.0338.28
4.4.60.0000.0408.28
4.4.50.0000.0278.28
4.4.40.0000.0278.28
4.4.30.0000.0308.28
4.4.20.0000.0208.28
4.4.10.0000.0378.28
4.4.00.0030.0238.28
4.3.110.0000.0208.28
4.3.100.0100.0308.28
4.3.90.0070.0238.28
4.3.80.0030.0278.28
4.3.70.0070.0208.28
4.3.60.0070.0308.28
4.3.50.0000.0208.28
4.3.40.0070.0278.28
4.3.30.0000.0308.28
4.3.20.0030.0308.28
4.3.10.0030.0238.28
4.3.00.0000.0238.28

preferences:
44 ms | 401 KiB | 5 Q