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; echo $this->test . PHP_EOL; $this->test = "456"; } } 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.01218.43
8.3.50.0150.00721.94
8.3.40.0120.00618.97
8.3.30.0110.00719.07
8.3.20.0110.00320.06
8.3.10.0040.00421.92
8.3.00.0000.00822.45
8.2.180.0070.00718.29
8.2.170.0110.00322.96
8.2.160.0100.01020.82
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0050.00317.63
8.2.110.0090.00022.07
8.2.100.0040.00817.42
8.2.90.0000.00719.26
8.2.80.0060.00317.97
8.2.70.0060.00317.25
8.2.60.0000.00817.80
8.2.50.0000.00818.07
8.2.40.0040.00417.92
8.2.30.0000.00818.07
8.2.20.0040.00417.68
8.2.10.0080.00017.65
8.2.00.0030.00617.49
8.1.280.0100.00325.92
8.1.270.0070.01123.83
8.1.260.0080.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00323.84
8.1.230.0090.00319.09
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0080.00017.52
8.1.180.0050.00318.10
8.1.170.0080.00018.63
8.1.160.0000.00822.08
8.1.150.0040.00418.52
8.1.140.0060.00317.52
8.1.130.0040.00417.83
8.1.120.0000.00717.48
8.1.110.0030.00517.42
8.1.100.0050.00317.50
8.1.90.0040.00417.45
8.1.80.0030.00317.37
8.1.70.0030.00317.32
8.1.60.0000.00917.60
8.1.50.0040.00417.53
8.1.40.0040.00417.50
8.1.30.0040.00417.47
8.1.20.0000.00817.61
8.1.10.0040.00417.52
8.1.00.0000.00717.52
8.0.300.0050.00218.77
8.0.290.0000.00817.05
8.0.280.0000.00818.40
8.0.270.0070.00017.31
8.0.260.0000.00716.83
8.0.250.0030.00416.83
8.0.240.0070.00016.96
8.0.230.0040.00416.85
8.0.220.0000.00716.95
8.0.210.0000.00616.94
8.0.200.0030.00316.98
8.0.190.0000.00716.94
8.0.180.0040.00416.88
8.0.170.0030.00516.95
8.0.160.0000.00716.78
8.0.150.0030.00316.93
8.0.140.0000.00716.82
8.0.130.0050.00013.36
8.0.120.0040.00416.84
8.0.110.0040.00416.86
8.0.100.0040.00416.78
8.0.90.0050.00316.78
8.0.80.0100.00716.90
8.0.70.0040.00416.72
8.0.60.0070.00016.64
8.0.50.0000.00716.72
8.0.30.0100.00917.24
8.0.20.0060.01517.40
8.0.10.0080.00017.00
8.0.00.0140.01116.76
7.4.330.0000.00515.00
7.4.320.0000.00716.46
7.4.300.0070.00016.45
7.4.290.0070.00016.55
7.4.280.0000.00716.35
7.4.270.0040.00416.54
7.4.260.0000.00616.59
7.4.250.0040.00416.41
7.4.240.0040.00416.54
7.4.230.0040.00416.69
7.4.220.0090.00916.46
7.4.210.0100.00416.60
7.4.200.0070.00016.45
7.4.190.0040.00416.58
7.4.160.0130.00316.50
7.4.150.0120.00617.40
7.4.140.0090.01117.86
7.4.130.0130.00816.54
7.4.120.0080.01116.49
7.4.110.0040.01316.34
7.4.100.0060.01216.66
7.4.90.0080.00816.46
7.4.80.0070.01016.56
7.4.70.0080.00916.43
7.4.60.0080.00816.43
7.4.50.0000.00816.49
7.4.40.0080.00522.77
7.4.30.0080.00816.48
7.4.10.0040.01114.95
7.4.00.0050.01014.94
7.3.330.0000.00513.38
7.3.320.0060.00013.13
7.3.310.0040.00416.42
7.3.300.0000.00716.25
7.3.290.0080.01216.47
7.3.280.0100.00816.37
7.3.270.0140.00317.40
7.3.260.0120.00616.33
7.3.250.0100.00616.40
7.3.240.0080.00916.49
7.3.230.0110.00616.39
7.3.210.0150.00316.35
7.3.200.0150.00319.39
7.3.190.0170.01616.45
7.3.180.0030.01416.56
7.3.170.0060.01216.44
7.3.160.0160.00016.60
7.3.130.0030.01414.90
7.3.120.0060.00814.75
7.3.110.0030.01314.63
7.3.100.0040.01015.00
7.3.90.0030.01014.72
7.3.80.0050.00714.78
7.3.70.0050.01014.80
7.3.60.0020.01114.74
7.3.50.0090.00414.86
7.3.40.0040.00714.68
7.3.30.0060.00714.79
7.3.20.0060.00716.61
7.3.10.0070.00416.54
7.3.00.0050.00816.77
7.2.330.0090.00916.43
7.2.320.0140.00716.57
7.2.310.0100.00716.72
7.2.300.0140.00316.77
7.2.290.0080.00916.45
7.2.260.0070.00714.80
7.2.250.0060.01015.03
7.2.240.0030.01414.99
7.2.230.0060.00814.98
7.2.220.0070.00715.07
7.2.210.0030.01214.98
7.2.200.0060.00814.99
7.2.190.0050.00915.02
7.2.180.0060.00715.05
7.2.170.0040.01015.10
7.2.160.0070.00615.00
7.2.150.0050.00916.81
7.2.140.0060.01017.08
7.2.130.0040.00816.84
7.2.120.0030.00716.97
7.2.110.0070.00716.88
7.2.100.0070.00616.88
7.2.90.0070.01016.91
7.2.80.0100.00616.78
7.2.70.0060.00917.05
7.2.60.0070.00816.81
7.2.50.0060.00616.93
7.2.40.0060.00617.02
7.2.30.0050.00917.03
7.2.20.0060.00616.87
7.2.10.0080.00517.00
7.2.00.0050.00817.49
7.1.330.0100.00615.63
7.1.320.0050.01215.75
7.1.310.0080.00315.65
7.1.300.0050.00915.69
7.1.290.0030.00915.80
7.1.280.0060.00915.75
7.1.270.0030.00815.70
7.1.260.0040.00915.66
7.1.250.0030.00715.68
7.1.240.0080.00515.66
7.1.230.0090.00415.74
7.1.220.0020.01315.75
7.1.210.0050.00515.72
7.1.200.0070.00415.66
7.1.190.0060.00715.78
7.1.180.0080.00615.73
7.1.170.0070.00615.76
7.1.160.0030.00915.63
7.1.150.0030.00915.79
7.1.140.0070.00315.79
7.1.130.0030.00815.61
7.1.120.0020.01415.60
7.1.110.0030.01215.76
7.1.100.0040.00916.53
7.1.90.0070.00515.81
7.1.80.0020.01215.69
7.1.70.0070.00516.02
7.1.60.0050.00817.01
7.1.50.0110.00416.26
7.1.40.0050.00615.80
7.1.30.0050.00715.71
7.1.20.0050.00515.86
7.1.10.0020.01215.73
7.1.00.0040.02818.05
7.0.330.0120.00215.38
7.0.320.0030.00615.35
7.0.310.0090.00715.28
7.0.300.0030.00715.31
7.0.290.0070.00415.40
7.0.280.0040.00615.30
7.0.270.0060.00615.44
7.0.260.0070.00715.30
7.0.250.0000.01215.30
7.0.240.0060.00815.52
7.0.230.0020.01215.48
7.0.220.0060.00615.50
7.0.210.0040.00615.41
7.0.200.0080.00315.77
7.0.190.0050.00915.50
7.0.180.0040.00715.24
7.0.170.0080.00515.45
7.0.160.0060.00715.41
7.0.150.0030.00815.36
7.0.140.0050.02817.54
7.0.130.0100.00515.36
7.0.120.0030.00715.52
7.0.110.0050.00715.29
7.0.100.0170.03116.95
7.0.90.0050.03616.84
7.0.80.0040.03116.73
7.0.70.0070.02916.95
7.0.60.0040.03417.05
7.0.50.0150.02717.18
7.0.40.0040.02915.71
7.0.30.0060.03115.69
7.0.20.0070.03015.64
7.0.10.0080.03115.72
7.0.00.0030.03515.55
5.6.400.0050.01014.18
5.6.390.0030.01214.66
5.6.380.0060.00614.36
5.6.370.0020.01414.59
5.6.360.0070.00514.43
5.6.350.0070.00814.43
5.6.340.0060.00614.28
5.6.330.0070.00514.42
5.6.320.0050.00814.33
5.6.310.0050.00914.38
5.6.300.0010.01014.33
5.6.290.0020.01114.29
5.6.280.0030.02816.70
5.6.270.0070.00614.53
5.6.260.0080.00514.46
5.6.250.0040.03416.47
5.6.240.0060.03016.49
5.6.230.0080.03016.54
5.6.220.0060.03316.37
5.6.210.0080.03116.37
5.6.200.0130.02016.57
5.6.190.0090.02216.64
5.6.180.0080.03116.54
5.6.170.0020.03616.63
5.6.160.0100.02916.70
5.6.150.0060.02716.53
5.6.140.0060.03016.65
5.6.130.0070.03016.55
5.6.120.0070.03416.47
5.6.110.0020.03816.59
5.6.100.0050.03416.53
5.6.90.0080.03216.55
5.6.80.0060.03116.30
5.6.70.0060.03416.27
5.6.60.0060.03216.27
5.6.50.0060.03416.27
5.6.40.0080.02816.43
5.6.30.0100.02716.29
5.6.20.0120.02416.26
5.6.10.0070.03016.34
5.6.00.0080.02816.22
5.5.380.0050.03116.30
5.5.370.0070.03016.36
5.5.360.0080.02516.31
5.5.350.0010.03516.37
5.5.340.0090.02916.40
5.5.330.0120.02816.57
5.5.320.0070.03216.55
5.5.310.0090.02916.32
5.5.300.0090.02916.42
5.5.290.0030.03616.70
5.5.280.0060.03516.50
5.5.270.0070.02916.43
5.5.260.0070.03316.41
5.5.250.0100.03016.40
5.5.240.0050.03016.29
5.5.230.0060.03016.26
5.5.220.0090.03016.12
5.5.210.0080.03116.10
5.5.200.0050.03016.04
5.5.190.0040.03216.04
5.5.180.0050.03016.24
5.5.170.0060.00814.07
5.5.160.0120.02516.19
5.5.150.0070.02716.06
5.5.140.0040.02716.23
5.5.130.0060.03516.23
5.5.120.0080.02716.15
5.5.110.0060.03116.22
5.5.100.0080.02816.12
5.5.90.0070.03016.24
5.5.80.0080.03216.01
5.5.70.0080.02916.20
5.5.60.0070.03116.15
5.5.50.0070.02716.23
5.5.40.0050.02316.14
5.5.30.0070.03316.22
5.5.20.0080.02916.09
5.5.10.0050.02816.18
5.5.00.0050.03516.12
5.4.450.0050.02913.90
5.4.440.0050.03013.82
5.4.430.0060.02613.90
5.4.420.0080.02713.99
5.4.410.0050.03213.97
5.4.400.0080.02713.84
5.4.390.0040.02913.76
5.4.380.0110.02313.86
5.4.370.0030.02913.86
5.4.360.0010.03313.73
5.4.350.0050.02813.89
5.4.340.0060.02813.81
5.4.330.0040.00611.32
5.4.320.0100.02813.84
5.4.310.0020.02813.79
5.4.300.0090.02513.91
5.4.290.0050.03113.82
5.4.280.0060.02913.74
5.4.270.0020.03413.85
5.4.260.0020.03213.76
5.4.250.0060.02913.92
5.4.240.0070.02913.79
5.4.230.0080.02613.78
5.4.220.0060.02913.82
5.4.210.0040.03113.87
5.4.200.0020.03213.76
5.4.190.0070.03013.78
5.4.180.0080.02713.84
5.4.170.0080.02713.80
5.4.160.0100.02313.70
5.4.150.0060.02913.78
5.4.140.0060.02412.99
5.4.130.0040.02712.95
5.4.120.0040.02812.92
5.4.110.0060.02912.93
5.4.100.0060.02713.09
5.4.90.0000.02212.98
5.4.80.0070.02612.96
5.4.70.0050.02512.99
5.4.60.0040.03012.97
5.4.50.0040.02312.93
5.4.40.0040.03012.90
5.4.30.0080.02612.91
5.4.20.0050.02813.01
5.4.10.0070.02212.91
5.4.00.0070.01412.83
5.3.290.0040.02912.28
5.3.280.0090.02812.09
5.3.270.0020.03112.24
5.3.260.0040.03112.26
5.3.250.0040.03012.21
5.3.240.0020.03012.17
5.3.230.0060.02712.19
5.3.220.0030.02112.07
5.3.210.0020.02912.15
5.3.200.0080.02612.15
5.3.190.0040.02412.18
5.3.180.0060.02812.14
5.3.170.0010.02912.15
5.3.160.0070.02512.21
5.3.150.0040.03012.25
5.3.140.0040.03012.21
5.3.130.0040.01912.16
5.3.120.0050.02412.24
5.3.110.0120.02412.22
5.3.100.0070.01712.05
5.3.90.0050.02712.06
5.3.80.0060.02911.98
5.3.70.0030.03311.89
5.3.60.0010.03311.99
5.3.50.0030.02011.89
5.3.40.0050.02611.95
5.3.30.0050.02011.94
5.3.20.0070.02711.82
5.3.10.0080.02611.74
5.3.00.0070.02311.80
5.2.170.0100.04311.09
5.2.160.0100.06011.17
5.2.150.0130.05311.29
5.2.140.0000.06711.06
5.2.130.0130.04311.16
5.2.120.0070.03010.97
5.2.110.0070.03710.97
5.2.100.0130.05011.21
5.2.90.0030.06011.19
5.2.80.0070.05311.17
5.2.70.0100.06010.96
5.2.60.0000.06310.98
5.2.50.0100.04311.05
5.2.40.0100.05011.07
5.2.30.0100.05311.00
5.2.20.0030.05710.89
5.2.10.0000.06710.83
5.2.00.0030.06010.79
5.1.60.0030.05310.11
5.1.50.0070.05010.11
5.1.40.0070.05010.07
5.1.30.0100.04710.38
5.1.20.0070.05310.37
5.1.10.0130.03010.07
5.1.00.0000.0509.96
5.0.50.0000.0509.46
5.0.40.0030.0339.46
5.0.30.0070.0639.46
5.0.20.0000.0479.46
5.0.10.0030.0339.46
5.0.00.0030.0679.46
4.4.90.0000.0379.46
4.4.80.0070.0309.46
4.4.70.0000.0379.46
4.4.60.0000.0379.46
4.4.50.0030.0379.46
4.4.40.0030.0539.46
4.4.30.0000.0379.46
4.4.20.0030.0309.46
4.4.10.0000.0379.46
4.4.00.0100.0479.46
4.3.110.0030.0239.46
4.3.100.0000.0379.46
4.3.90.0000.0379.46
4.3.80.0070.0379.46
4.3.70.0000.0339.46
4.3.60.0000.0279.46
4.3.50.0030.0239.46
4.3.40.0000.0539.46
4.3.30.0000.0379.46
4.3.20.0070.0339.46
4.3.10.0030.0379.46
4.3.00.0000.0379.46

preferences:
42.55 ms | 401 KiB | 5 Q