3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$test = array( 'permissions2', 'this2', 'test'); //$toost = array('permissions2', 'test', 'this2'); //$yo = array_diff($toost, $test); //if (array_diff($toost, $test) || array_diff($test, $toost)) // echo 'false'; //else // echo 'true'; error_reporting(-1); ini_set('display_errors', 'on'); 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.70.0080.01116.58
8.3.60.0110.00718.43
8.3.50.0100.00822.78
8.3.40.0150.00018.80
8.3.30.0060.00919.25
8.3.20.0000.00820.34
8.3.10.0060.00320.64
8.3.00.0030.00519.25
8.2.180.0130.00616.75
8.2.170.0140.00322.96
8.2.160.0080.00820.18
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0060.00320.96
8.2.110.0060.00322.05
8.2.100.0000.01118.22
8.2.90.0070.00319.21
8.2.80.0030.00617.97
8.2.70.0030.00517.63
8.2.60.0060.00318.04
8.2.50.0040.00418.07
8.2.40.0080.00018.09
8.2.30.0040.00419.49
8.2.20.0060.00317.69
8.2.10.0040.00417.87
8.2.00.0040.00417.68
8.1.280.0140.00425.92
8.1.270.0080.00023.84
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00523.92
8.1.230.0080.00419.02
8.1.220.0000.00817.74
8.1.210.0000.00918.77
8.1.200.0000.00917.10
8.1.190.0060.00317.22
8.1.180.0040.00418.10
8.1.170.0040.00418.45
8.1.160.0040.00421.98
8.1.150.0040.00418.70
8.1.140.0040.00417.45
8.1.130.0000.00717.82
8.1.120.0040.00417.30
8.1.110.0030.00517.37
8.1.100.0050.00317.29
8.1.90.0070.00017.35
8.1.80.0000.00717.41
8.1.70.0000.00717.41
8.1.60.0000.00817.41
8.1.50.0040.00417.50
8.1.40.0030.00517.40
8.1.30.0000.00817.52
8.1.20.0040.00417.54
8.1.10.0040.00417.55
8.1.00.0020.00517.47
8.0.300.0040.00418.77
8.0.290.0050.00316.75
8.0.280.0070.00018.36
8.0.270.0000.00717.27
8.0.260.0030.00317.13
8.0.250.0030.00317.00
8.0.240.0000.00817.02
8.0.230.0030.00316.96
8.0.220.0030.00416.96
8.0.210.0040.00416.87
8.0.200.0000.00816.95
8.0.190.0030.00316.96
8.0.180.0030.00516.84
8.0.170.0080.00016.82
8.0.160.0030.00516.86
8.0.150.0040.00416.76
8.0.140.0070.00016.84
8.0.130.0060.00013.34
8.0.120.0040.00816.84
8.0.110.0040.00416.80
8.0.100.0040.00416.71
8.0.90.0000.00716.69
8.0.80.0040.01116.84
8.0.70.0090.00016.86
8.0.60.0000.00816.80
8.0.50.0030.00516.95
8.0.30.0070.01217.10
8.0.20.0100.00917.40
8.0.10.0030.00516.84
8.0.00.0100.01016.91
7.4.330.0050.00015.00
7.4.320.0000.00616.52
7.4.300.0030.00316.52
7.4.290.0070.00016.59
7.4.280.0000.00716.50
7.4.270.0030.00316.52
7.4.260.0070.00016.42
7.4.250.0030.00516.37
7.4.240.0020.00516.58
7.4.230.0070.00016.70
7.4.220.0090.00916.63
7.4.210.0100.00316.63
7.4.200.0040.00416.48
7.4.160.0110.00616.49
7.4.150.0090.00917.40
7.4.140.0080.00817.86
7.4.130.0100.00716.60
7.4.120.0050.01216.50
7.4.110.0040.01216.70
7.4.100.0120.00616.41
7.4.90.0150.00316.46
7.4.80.0060.01619.39
7.4.70.0140.00416.36
7.4.60.0030.01316.39
7.4.50.0030.00316.38
7.4.40.0160.00816.44
7.4.30.0160.00016.58
7.4.00.0000.01714.88
7.3.330.0060.00013.32
7.3.320.0060.00013.31
7.3.310.0000.00716.22
7.3.300.0030.00316.32
7.3.290.0130.00616.37
7.3.280.0070.00916.35
7.3.270.0110.00717.40
7.3.260.0110.00616.32
7.3.250.0170.00416.48
7.3.240.0160.00616.35
7.3.230.0170.00016.41
7.3.210.0170.00016.21
7.3.200.0100.01019.39
7.3.190.0070.01416.59
7.3.180.0090.00616.50
7.3.170.0110.00716.48
7.3.160.0080.00816.53
7.2.330.0060.01216.73
7.2.320.0120.00916.73
7.2.310.0150.00316.72
7.2.300.0200.00316.31
7.2.290.0060.01116.65
7.2.60.0030.01317.07
7.2.00.0100.01019.54
7.1.200.0030.00615.82
7.1.100.0260.00417.96
7.1.70.0000.00716.73
7.1.60.0120.01219.61
7.1.50.0070.01316.89
7.1.00.0030.07722.34
7.0.200.0000.00816.73
7.0.140.0000.07721.95
7.0.60.0170.05320.04
7.0.50.0070.04717.96
7.0.40.0200.05720.18
7.0.30.0370.06320.23
7.0.20.0300.08020.35
7.0.10.0230.06020.07
7.0.00.0070.05320.23
5.6.280.0070.07021.05
5.6.210.0100.06720.77
5.6.200.0030.06318.15
5.6.190.0170.08020.33
5.6.180.0230.06020.66
5.6.170.0230.06020.45
5.6.160.0070.07320.48
5.6.150.0030.07018.15
5.6.140.0030.07318.24
5.6.130.0100.07318.28
5.6.120.0070.08321.02
5.6.110.0030.09020.98
5.6.100.0100.08020.96
5.6.90.0030.08720.88
5.6.80.0130.04320.38
5.6.70.4230.03720.40
5.5.350.0170.07320.54
5.5.340.0070.07318.00
5.5.330.0100.07720.13
5.5.320.0230.05720.46
5.5.310.0200.06320.30
5.5.300.0070.08018.07
5.5.290.0000.04318.02
5.5.280.0100.06320.88
5.5.270.0130.05720.89
5.5.260.0030.07320.96
5.5.250.0070.04020.45
5.5.240.0200.07020.29
5.4.450.0470.03319.55
5.4.440.1470.04319.49
5.4.430.0100.05719.58
5.4.420.0230.04719.49
5.4.410.0070.05319.15
5.4.400.0330.03318.88
5.4.390.0230.04319.09
5.4.380.0430.07018.72
5.4.370.0430.06318.78
5.4.360.0370.06718.83
5.4.350.0400.05318.72
5.4.340.0300.05718.78
5.4.320.0110.03112.51
5.4.310.0070.03812.51
5.4.300.0060.03812.51
5.4.290.0060.03812.50
5.4.280.0070.04912.40
5.4.270.0100.04512.39
5.4.260.0090.05112.40
5.4.250.0090.03812.40
5.4.240.0040.03712.40
5.4.230.0080.03712.39
5.4.220.0080.04812.39
5.4.210.0080.03812.39
5.4.200.0070.04612.39
5.4.190.0040.03812.38
5.4.180.0090.03312.39
5.4.170.0110.03212.40
5.4.160.0090.03812.39
5.4.150.0060.04212.39
5.4.140.0070.03912.07
5.4.130.0080.03912.06
5.4.120.0090.03512.02
5.4.110.0090.03612.02
5.4.100.0070.04012.02
5.4.90.0080.04112.02
5.4.80.0080.03712.02
5.4.70.0060.03612.01
5.4.60.0050.04012.01
5.4.50.0090.03512.01
5.4.40.0070.03612.00
5.4.30.0100.04112.00
5.4.20.0070.03611.99
5.4.10.0050.03712.00
5.4.00.0060.03811.49
5.3.290.0070.04112.80
5.3.280.0130.03812.71
5.3.270.0070.04412.72
5.3.260.0120.04112.72
5.3.250.0080.03812.72
5.3.240.0080.03812.72
5.3.230.0050.03912.71
5.3.220.0100.03912.68
5.3.210.0070.04112.68
5.3.200.0100.03212.68
5.3.190.0070.03812.68
5.3.180.0080.04012.68
5.3.170.0080.03912.67
5.3.160.0090.05212.68
5.3.150.0100.04012.68
5.3.140.0060.04112.66
5.3.130.0100.03912.66
5.3.120.0100.04012.66
5.3.110.0110.04212.66
5.3.100.0110.05312.13
5.3.90.0090.05612.11
5.3.80.0130.05412.10
5.3.70.0100.05712.10
5.3.60.0080.05912.08
5.3.50.0130.03712.04
5.3.40.0070.04012.04
5.3.30.0100.03411.99
5.3.20.0080.04911.77
5.3.10.0080.04311.73
5.3.00.0100.04911.72
5.2.170.0090.0399.23
5.2.160.0070.0409.23
5.2.150.0090.0389.22
5.2.140.0110.0329.22
5.2.130.0080.0379.18
5.2.120.0050.0409.18
5.2.110.0070.0369.18
5.2.100.0090.0279.18
5.2.90.0060.0299.18
5.2.80.0060.0299.18
5.2.70.0020.0349.18
5.2.60.0070.0329.13
5.2.50.0110.0269.10
5.2.40.0060.0319.08
5.2.30.0090.0379.05
5.2.20.0100.0419.04
5.2.10.0090.0298.95
5.2.00.0040.0318.81
5.1.60.0060.0258.09
5.1.50.0050.0268.09
5.1.40.0050.0258.07
5.1.30.0080.0248.43
5.1.20.0080.0288.45
5.1.10.0040.0318.17
5.1.00.0080.0348.17
5.0.50.0030.0286.64
5.0.40.0030.0246.52
5.0.30.0060.0316.32
5.0.20.0050.0186.29
5.0.10.0080.0206.27
5.0.00.0060.0346.26
4.4.90.0040.0154.78
4.4.80.0020.0204.76
4.4.70.0040.0154.76
4.4.60.0050.0164.76
4.4.50.0040.0184.77
4.4.40.0020.0264.71
4.4.30.0040.0144.76
4.4.20.0040.0154.84
4.4.10.0040.0154.85
4.4.00.0040.0244.76
4.3.110.0050.0154.67
4.3.100.0020.0164.67
4.3.90.0040.0134.63
4.3.80.0050.0264.58
4.3.70.0030.0144.63
4.3.60.0030.0144.63
4.3.50.0020.0174.63
4.3.40.0060.0214.54
4.3.30.0010.0173.30
4.3.20.0040.0143.28
4.3.10.0020.0153.23
4.3.00.0000.01718.16

preferences:
36.99 ms | 401 KiB | 5 Q