3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private function foo() { echo "success!" . get_class($this) . "\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.60.0070.01016.50
8.3.50.0040.01116.10
8.3.40.0120.00318.67
8.3.30.0070.00718.73
8.3.20.0030.00520.29
8.3.10.0050.00321.90
8.3.00.0040.00421.65
8.2.180.0100.00716.47
8.2.170.0110.00422.96
8.2.160.0030.01020.38
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00420.78
8.2.120.0040.00426.35
8.2.110.0090.00019.30
8.2.100.0040.00817.93
8.2.90.0050.00219.22
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0030.00618.04
8.2.50.0030.00618.09
8.2.40.0000.00822.27
8.2.30.0030.00319.37
8.2.20.0000.00717.61
8.2.10.0050.00218.15
8.2.00.0040.00417.93
8.1.280.0110.00725.92
8.1.270.0040.00422.19
8.1.260.0020.00528.09
8.1.250.0040.00428.09
8.1.240.0060.00322.48
8.1.230.0040.00717.64
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.13
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0000.00918.59
8.1.160.0000.00720.66
8.1.150.0000.00720.64
8.1.140.0000.00819.51
8.1.130.0030.00317.71
8.1.120.0040.00417.36
8.1.110.0040.00417.45
8.1.100.0040.00417.42
8.1.90.0030.00517.45
8.1.80.0000.00817.36
8.1.70.0000.00717.43
8.1.60.0050.00317.59
8.1.50.0000.00917.43
8.1.40.0000.00817.43
8.1.30.0030.00517.63
8.1.20.0040.00417.67
8.1.10.0000.00817.53
8.1.00.0000.00817.52
8.0.300.0030.00618.77
8.0.290.0040.00416.63
8.0.280.0000.00718.36
8.0.270.0030.00317.27
8.0.260.0030.00517.23
8.0.250.0030.00316.91
8.0.240.0030.00317.02
8.0.230.0030.00317.04
8.0.220.0040.00416.82
8.0.210.0040.00416.93
8.0.200.0030.00316.92
8.0.190.0030.00617.01
8.0.180.0040.00416.97
8.0.170.0050.00616.49
8.0.160.0050.00317.06
8.0.150.0040.00416.92
8.0.140.0000.00716.93
8.0.130.0000.00813.46
8.0.120.0000.00716.80
8.0.110.0040.00416.87
8.0.100.0000.00717.02
8.0.90.0000.00716.90
8.0.80.0120.00916.97
8.0.70.0040.00416.95
8.0.60.0040.00416.95
8.0.50.0000.00716.90
8.0.30.0090.01117.19
8.0.20.0090.01217.40
8.0.10.0000.00816.87
8.0.00.0100.00716.87
7.4.330.0050.00016.81
7.4.320.0060.00016.38
7.4.300.0030.00316.48
7.4.290.0070.00316.51
7.4.280.0000.00816.52
7.4.270.0030.00316.55
7.4.260.0000.00716.38
7.4.250.0000.00716.51
7.4.240.0040.00416.60
7.4.230.0070.00016.48
7.4.220.0130.00616.59
7.4.210.0080.00616.63
7.4.200.0030.00316.41
7.4.160.0080.00816.63
7.4.150.0180.00017.40
7.4.140.0090.01217.86
7.4.130.0120.00516.49
7.4.120.0130.00616.45
7.4.110.0130.01016.71
7.4.100.0000.01716.29
7.4.90.0080.00816.39
7.4.80.0060.01119.39
7.4.70.0060.01016.46
7.4.60.0150.00316.56
7.4.50.0040.01216.58
7.4.40.0000.01716.48
7.4.30.0170.00716.52
7.4.00.0080.00814.89
7.3.330.0000.00513.14
7.3.320.0050.00013.15
7.3.310.0030.00316.37
7.3.300.0030.00316.32
7.3.290.0030.00316.28
7.3.280.0060.01216.35
7.3.270.0060.01317.40
7.3.260.0140.00316.64
7.3.250.0080.00816.33
7.3.240.0070.00916.41
7.3.230.0080.00816.39
7.3.210.0110.00716.46
7.3.200.0060.00919.39
7.3.190.0160.00016.37
7.3.180.0100.00716.57
7.3.170.0160.00616.37
7.3.160.0150.00616.41
7.3.120.0070.01014.79
7.3.110.0140.00314.94
7.3.100.0130.00014.64
7.3.90.0080.00414.87
7.3.80.0070.00714.46
7.3.70.0070.00314.58
7.3.60.0030.00614.65
7.3.50.0040.01114.61
7.3.40.0000.01014.84
7.3.30.0100.00314.88
7.3.20.0030.00916.74
7.3.10.0060.00716.55
7.3.00.0080.00516.67
7.2.330.0040.01216.67
7.2.320.0160.00316.80
7.2.310.0090.00916.48
7.2.300.0140.00416.70
7.2.290.0040.01316.75
7.2.250.0000.01215.20
7.2.240.0100.01014.71
7.2.230.0040.01114.90
7.2.220.0000.01214.68
7.2.210.0060.00615.29
7.2.200.0000.01115.21
7.2.190.0060.00615.14
7.2.180.0030.01314.94
7.2.170.0090.00315.07
7.2.130.0070.00716.70
7.2.120.0060.00916.88
7.2.110.0060.01016.88
7.2.100.0040.01117.06
7.2.90.0060.00916.86
7.2.80.0030.00916.68
7.2.70.0090.00317.06
7.2.60.0050.01016.99
7.2.50.0070.00716.86
7.2.40.0060.00916.96
7.2.30.0070.00717.04
7.2.20.0130.00316.95
7.2.10.0000.01417.04
7.2.00.0060.01118.21
7.1.330.0030.01015.91
7.1.320.0070.00315.46
7.1.310.0040.00715.89
7.1.300.0070.00715.79
7.1.290.0030.00815.45
7.1.280.0030.01015.65
7.1.270.0040.00815.71
7.1.260.0090.00615.89
7.1.250.0120.00315.81
7.1.200.0070.00415.76
7.1.100.0060.00617.81
7.1.70.0030.00617.20
7.1.60.0140.01019.40
7.1.50.0070.01616.95
7.1.00.0030.07722.42
7.0.200.0490.01114.63
7.0.60.0130.07321.66
7.0.50.0070.08017.86
7.0.40.0170.04320.24
7.0.30.0370.07320.08
7.0.20.0300.06720.22
7.0.10.0200.07720.24
7.0.00.0030.05320.18
5.6.280.0030.06021.03
5.6.210.0100.08320.73
5.6.200.0130.08018.16
5.6.190.0000.07020.52
5.6.180.0300.03720.47
5.6.170.0370.04320.45
5.6.160.0130.07320.54
5.6.150.0030.06718.17
5.6.140.0070.07718.24
5.6.130.0070.04718.14
5.6.120.0070.05321.01
5.6.110.0030.07721.01
5.6.100.0030.06020.93
5.6.90.0100.05721.02
5.6.80.0000.08720.38
5.5.350.0230.07320.38
5.5.340.0070.05017.95
5.5.330.0070.06320.32
5.5.320.0600.05720.33
5.5.310.0270.05020.22
5.5.300.0000.04018.07
5.5.290.0030.08017.92
5.5.280.0130.07720.90
5.5.270.0100.07720.73
5.5.260.0070.08320.96
5.5.250.0030.04020.59
5.5.240.3830.03720.28

preferences:
51.69 ms | 400 KiB | 5 Q