3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private function foo() { echo "success!\n"; } public function test() { $this->foo(); //static::foo(); } } class B extends A { /* foo() will be copied to B, hence its scope will still be A and * the call be successful */ } class C extends A { private function foo() { /* original method is replaced; the scope of the new one is C */ } } //$b = new B(); //$b->test(); $c = new C(); $c->test(); //fails ?>

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.40.0070.00718.67
8.3.30.0070.00720.34
8.3.20.0040.01121.92
8.3.10.0060.00321.09
8.3.00.0000.00822.57
8.2.170.0130.00322.96
8.2.160.0070.00722.24
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0110.00726.16
8.2.120.0080.00820.80
8.2.110.0090.00319.11
8.2.100.0040.00817.66
8.2.90.0000.00819.22
8.2.80.0040.00418.00
8.2.70.0040.00417.50
8.2.60.0000.01018.05
8.2.50.0080.00018.07
8.2.40.0080.00018.21
8.2.30.0070.00019.46
8.2.20.0000.00817.53
8.2.10.0070.00017.64
8.2.00.0080.00317.59
8.1.270.0030.00523.99
8.1.260.0030.01726.35
8.1.250.0040.00428.09
8.1.240.0070.00322.38
8.1.230.0040.00720.96
8.1.220.0040.00418.77
8.1.210.0040.00718.95
8.1.200.0060.00317.13
8.1.190.0040.00417.53
8.1.180.0040.00418.10
8.1.170.0090.00018.57
8.1.160.0040.00418.73
8.1.150.0000.00818.51
8.1.140.0040.00417.33
8.1.130.0030.00317.88
8.1.120.0040.00317.46
8.1.110.0070.00017.39
8.1.100.0030.00317.32
8.1.90.0000.00717.29
8.1.80.0070.00017.38
8.1.70.0030.00317.36
8.1.60.0030.00617.50
8.1.50.0040.00417.51
8.1.40.0040.00417.50
8.1.30.0000.00717.51
8.1.20.0030.00517.55
8.1.10.0040.00417.44
8.1.00.0050.00217.51
8.0.300.0000.00719.71
8.0.290.0030.00317.29
8.0.280.0030.00318.40
8.0.270.0040.00417.21
8.0.260.0030.00316.76
8.0.250.0040.00416.95
8.0.240.0050.00216.84
8.0.230.0030.00316.75
8.0.220.0000.00716.71
8.0.210.0060.00016.83
8.0.200.0000.00616.76
8.0.190.0000.00716.90
8.0.180.0000.00816.71
8.0.170.0040.00416.79
8.0.160.0000.00716.82
8.0.150.0000.00716.78
8.0.140.0000.00816.68
8.0.130.0030.00313.27
8.0.120.0070.00016.77
8.0.110.0040.00416.82
8.0.100.0030.00416.80
8.0.90.0000.00716.69
8.0.80.0060.00916.82
8.0.70.0070.00016.89
8.0.60.0040.00416.82
8.0.50.0030.00516.84
8.0.30.0100.00817.07
8.0.20.0090.01317.40
8.0.10.0000.00716.90
8.0.00.0120.00916.83
7.4.330.0000.00516.75
7.4.320.0070.00016.52
7.4.300.0000.00616.40
7.4.290.0000.00716.40
7.4.280.0030.00316.48
7.4.270.0070.00016.59
7.4.260.0050.00013.29
7.4.250.0000.00716.57
7.4.240.0000.00716.57
7.4.230.0030.00316.60
7.4.220.0040.01116.62
7.4.210.0060.01116.61
7.4.200.0070.00016.68
7.4.190.0000.00716.66
7.4.160.0070.01016.50
7.4.150.0040.01317.40
7.4.140.0120.01117.86
7.4.130.0100.01116.63
7.4.120.0050.01216.41
7.4.110.0130.00616.47
7.4.100.0100.00716.56
7.4.90.0040.01316.47
7.4.80.0090.01219.39
7.4.70.0090.00916.42
7.4.60.0120.01016.57
7.4.50.0060.00316.42
7.4.40.0070.00722.77
7.4.30.0190.00016.52
7.4.00.0000.01414.96
7.3.330.0020.00213.21
7.3.320.0020.00213.03
7.3.310.0030.00316.05
7.3.300.0000.00616.19
7.3.290.0070.00716.17
7.3.280.0100.00816.21
7.3.270.0100.00717.40
7.3.260.0080.01318.24
7.3.250.0110.00716.34
7.3.240.0080.01216.29
7.3.230.0110.00516.39
7.3.210.0060.01016.38
7.3.200.0200.00419.39
7.3.190.0130.00316.52
7.3.180.0100.00516.16
7.3.170.0090.00616.50
7.3.160.0130.00316.43
7.3.120.0050.00514.94
7.2.330.0080.00816.52
7.2.320.0030.01416.42
7.2.310.0130.00316.66
7.2.300.0090.00816.59
7.2.290.0100.00716.47
7.2.60.0060.00616.64
7.2.00.0030.00919.42
7.1.200.0130.00015.51
7.1.100.0000.01017.57
7.1.70.0070.00016.68
7.1.60.0030.02319.17
7.1.50.0070.01716.89
7.1.00.0030.03322.28
7.0.200.0030.00616.75
7.0.140.0030.07321.96
7.0.110.0130.07319.94
7.0.100.0170.03719.89
7.0.90.0030.08019.95
7.0.80.0070.08019.94
7.0.70.0000.08720.00
7.0.60.0130.06720.02
7.0.50.0070.04019.97
7.0.40.0100.03319.73
7.0.30.0070.07019.75
7.0.20.0000.06019.73
7.0.10.0170.06019.74
7.0.00.0070.03319.80
5.6.280.0070.06721.10
5.6.260.0070.04020.90
5.6.250.0030.06020.70
5.6.240.0030.07720.70
5.6.230.0030.08720.67
5.6.220.0100.08020.62
5.6.210.0100.06720.64
5.6.200.0000.07320.69
5.6.190.0100.07720.62
5.6.180.0170.02720.48
5.6.170.0130.03020.54
5.6.160.0100.07020.63
5.6.150.0070.08320.71
5.6.140.0000.08320.59
5.6.130.0030.03720.71
5.6.120.0070.07720.86
5.6.110.0000.07320.85
5.6.100.0070.07720.55
5.6.90.0130.04720.60
5.6.80.0070.07019.96
5.6.70.0070.05019.96
5.6.60.0030.07019.93
5.6.50.0130.07719.86
5.6.40.0070.06719.93
5.6.30.0070.06719.87
5.6.20.0030.08019.93
5.6.10.0170.06719.97
5.6.00.0070.06720.07
5.5.380.0100.07017.52
5.5.370.0030.04017.55
5.5.360.0130.07017.53
5.5.350.0030.04017.48
5.5.340.0030.06018.06
5.5.330.0000.07718.05
5.5.320.0070.06717.93
5.5.310.0030.04018.09
5.5.300.0100.06718.22
5.5.290.0070.08018.13
5.5.280.0070.07017.84
5.5.270.0070.07017.82
5.5.260.0030.08317.92
5.5.250.0030.07317.91
5.5.240.0070.07717.48
5.5.230.0070.08017.61
5.5.220.0030.06717.30
5.5.210.0000.04017.48
5.5.200.0070.07717.58
5.5.190.0070.04717.29
5.5.180.0030.07717.55
5.5.160.0030.03717.18
5.5.150.0000.03717.26
5.5.140.0170.06317.18
5.5.130.0070.06017.57
5.5.120.0030.04317.27
5.5.110.0070.04717.47
5.5.100.0030.03317.38
5.5.90.0100.03717.50
5.5.80.0070.07317.35
5.5.70.0030.03717.17
5.5.60.0000.05317.33
5.5.50.0100.07017.20
5.5.40.0070.03317.37
5.5.30.0070.06717.32
5.5.20.0030.07317.32
5.5.10.0030.04717.16
5.5.00.0070.07317.19
5.4.450.0030.03719.31
5.4.440.0000.08319.36
5.4.430.0030.04319.34
5.4.420.0100.02719.32
5.4.410.0070.08019.20
5.4.400.0170.06019.18
5.4.390.0000.03719.00
5.4.380.0070.08019.19
5.4.370.0030.07319.25
5.4.360.0170.06318.95
5.4.350.0030.05719.02
5.4.340.0070.03018.95
5.4.320.0070.05718.95
5.4.310.0030.03319.18
5.4.300.0000.07019.01
5.4.290.0030.04319.16
5.4.280.0170.05319.16
5.4.270.0000.03719.23
5.4.260.0030.03318.99
5.4.250.0030.08019.17
5.4.240.0070.03318.99
5.4.230.0030.08319.01
5.4.220.0000.08719.05
5.4.210.0030.07319.32
5.4.200.0070.04719.23
5.4.190.0100.05018.99
5.4.180.0100.06018.94
5.4.170.0100.07319.23
5.4.160.0130.07018.97
5.4.150.0170.06318.99
5.4.140.0000.04316.59
5.4.130.0070.04016.64
5.4.120.0000.08016.52
5.4.110.0130.06316.31
5.4.100.0000.07716.62
5.4.90.0070.03316.46
5.4.80.0000.05716.63
5.4.70.0070.04016.45
5.4.60.0000.07316.53
5.4.50.0200.05716.48
5.4.40.0100.07016.57
5.4.30.0030.07716.63
5.4.20.0130.07016.53
5.4.10.0100.07316.41
5.4.00.0130.05715.88
5.3.290.0070.07014.66
5.3.280.0030.04714.59
5.3.270.0130.02714.61
5.3.260.0100.03314.62
5.3.250.0070.03714.58
5.3.240.0070.06314.60
5.3.230.0070.06314.60
5.3.220.0030.07014.59
5.3.210.0100.07014.56
5.3.200.0100.03314.82
5.3.190.0030.07714.58
5.3.180.0030.07314.42
5.3.170.0100.07714.64
5.3.160.0030.06314.79
5.3.150.0030.06714.70
5.3.140.0100.07014.69
5.3.130.0030.05714.55
5.3.120.0030.07714.57
5.3.110.0030.08014.57
5.3.100.0100.07714.04
5.3.90.0100.03714.11
5.3.80.0030.06013.98
5.3.70.0200.06314.16
5.3.60.0100.07314.01
5.3.50.0100.03713.92
5.3.40.0000.06713.95
5.3.30.0070.06713.94
5.3.20.0030.03713.72
5.3.10.0100.05713.64
5.3.00.0100.07313.50
5.2.170.0000.07011.91
5.2.160.0070.06011.91
5.2.150.0130.05711.91
5.2.140.0030.06011.91
5.2.130.0030.06011.91
5.2.120.0000.06311.91
5.2.110.0070.05711.91
5.2.100.0070.06011.91
5.2.90.0100.03311.91
5.2.80.0070.05011.91
5.2.70.0070.05711.91
5.2.60.0000.03011.91
5.2.50.0100.05711.91
5.2.40.0100.05711.91
5.2.30.0030.02711.91
5.2.20.0100.06011.91
5.2.10.0100.05311.91
5.2.00.0000.03711.91
5.1.60.0030.05311.91
5.1.50.0070.02311.91
5.1.40.0100.04711.91
5.1.30.0100.04011.91
5.1.20.0000.05011.91
5.1.10.0030.04311.91
5.1.00.0000.02311.91
5.0.50.0000.04711.91
5.0.40.0000.02011.91
5.0.30.0000.03311.91
5.0.20.0000.03711.91
5.0.10.0030.02311.91
5.0.00.0030.05011.91
4.4.90.0030.03011.91
4.4.80.0000.03711.91
4.4.70.0000.03711.91
4.4.60.0030.01311.91
4.4.50.0030.03011.91
4.4.40.0070.05011.91
4.4.30.0070.03011.91
4.4.20.0000.01711.91
4.4.10.0070.02711.91
4.4.00.0030.02311.91
4.3.110.0000.02711.91
4.3.100.0070.01011.91
4.3.90.0000.02311.91
4.3.80.0000.05311.91
4.3.70.0000.03311.91
4.3.60.0000.03311.91
4.3.50.0030.01311.91
4.3.40.0000.03311.91
4.3.30.0030.03311.91
4.3.20.0000.03711.91
4.3.10.0000.02711.91
4.3.00.0000.02311.91

preferences:
46.1 ms | 400 KiB | 5 Q