3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { protected function test() { $this->testPrivate(); $this->privatefoo(); } private function testPrivate() { echo "Bar::testPrivate\n"; } } class Foo extends Bar { private function testPrivate() { echo "Foo::testPrivate\n"; } private function privatefoo(){ echo "Foo::privatefoo"; } public function testFooScope() { $this->testPrivate(); } } class Zot extends Foo { } $myZot = new Zot(); $myZot->test(); //What would this do other than Bar::testPrivate $myZot->testFooScope();

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.0130.00416.75
8.3.50.0100.00822.05
8.3.40.0120.00318.54
8.3.30.0110.00318.85
8.3.20.0040.00420.21
8.3.10.0070.00023.48
8.3.00.0080.00019.97
8.2.180.0160.00617.13
8.2.170.0070.00722.96
8.2.160.0110.00420.50
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0070.00321.12
8.2.120.0100.00026.35
8.2.110.0090.00020.47
8.2.100.0070.00417.91
8.2.90.0040.00419.07
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0000.00817.93
8.2.50.0030.00518.07
8.2.40.0040.00421.10
8.2.30.0040.00420.58
8.2.20.0080.00017.68
8.2.10.0070.00018.07
8.2.00.0000.00717.95
8.1.280.0170.00325.92
8.1.270.0080.00020.70
8.1.260.0000.00828.09
8.1.250.0080.00028.09
8.1.240.0060.00324.02
8.1.230.0030.00717.55
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.38
8.1.190.0000.00817.13
8.1.180.0030.00618.10
8.1.170.0040.00418.46
8.1.160.0040.00420.68
8.1.150.0040.00418.78
8.1.140.0030.00519.58
8.1.130.0030.00517.65
8.1.120.0000.00717.49
8.1.110.0040.00317.30
8.1.100.0030.00517.42
8.1.90.0040.00717.41
8.1.80.0040.00417.30
8.1.70.0040.00417.44
8.1.60.0030.00617.50
8.1.50.0040.00417.42
8.1.40.0060.00317.41
8.1.30.0030.00517.64
8.1.20.0030.00517.62
8.1.10.0070.00017.50
8.1.00.0060.00317.55
8.0.300.0050.00318.77
8.0.290.0000.00716.73
8.0.280.0030.00318.27
8.0.270.0070.00017.12
8.0.260.0000.00617.12
8.0.250.0060.00016.98
8.0.240.0040.00416.81
8.0.230.0030.00316.86
8.0.220.0000.00716.79
8.0.210.0000.00816.89
8.0.200.0030.00316.93
8.0.190.0030.00517.02
8.0.180.0060.00316.82
8.0.170.0040.00416.92
8.0.160.0000.00716.77
8.0.150.0040.00416.92
8.0.140.0030.00616.89
8.0.130.0030.00313.34
8.0.120.0040.00416.90
8.0.110.0070.00016.95
8.0.100.0000.00816.94
8.0.90.0070.00016.93
8.0.80.0150.00316.89
8.0.70.0040.00416.90
8.0.60.0050.00316.79
8.0.50.0030.00516.99
8.0.30.0050.01316.89
8.0.20.0100.00817.40
8.0.10.0070.00017.07
8.0.00.0100.01016.82
7.4.330.0060.00016.67
7.4.320.0070.00016.45
7.4.300.0000.00716.53
7.4.290.0030.00316.55
7.4.280.0030.00516.56
7.4.270.0000.00716.59
7.4.260.0040.00416.48
7.4.250.0040.00416.48
7.4.240.0030.00316.53
7.4.230.0070.00016.33
7.4.220.0160.00716.48
7.4.210.0070.00716.73
7.4.200.0000.00716.71
7.4.160.0100.01016.38
7.4.150.0100.00717.40
7.4.140.0160.00517.86
7.4.130.0130.00716.48
7.4.120.0130.00716.40
7.4.110.0040.01516.56
7.4.100.0060.01616.52
7.4.90.0100.00716.44
7.4.80.0170.00319.39
7.4.70.0070.01116.43
7.4.60.0130.00316.63
7.4.50.0070.01016.38
7.4.40.0070.01116.52
7.4.30.0120.00616.42
7.4.10.0070.01115.11
7.4.00.0020.01614.86
7.3.330.0000.00513.16
7.3.320.0050.00013.08
7.3.310.0070.00016.18
7.3.300.0050.00216.31
7.3.290.0080.00816.30
7.3.280.0060.01016.28
7.3.270.0060.00917.40
7.3.260.0060.01216.53
7.3.250.0090.01016.23
7.3.240.0090.00716.43
7.3.230.0130.00316.39
7.3.210.0130.00316.30
7.3.200.0100.00716.57
7.3.190.0120.00416.38
7.3.180.0070.01016.24
7.3.170.0060.01116.46
7.3.160.0040.01216.45
7.3.130.0090.00914.71
7.3.120.0030.01614.70
7.3.110.0060.01314.94
7.3.100.0100.00714.90
7.3.90.0090.00914.95
7.3.80.0030.01014.67
7.3.70.0120.00314.73
7.3.60.0100.00714.65
7.3.50.0000.01314.86
7.3.40.0000.01314.82
7.3.30.0060.00614.73
7.3.20.0000.00916.21
7.3.10.0060.00916.39
7.3.00.0040.00816.59
7.2.330.0120.00616.76
7.2.320.0100.01416.35
7.2.310.0070.01016.41
7.2.300.0060.01016.67
7.2.290.0180.00516.58
7.2.260.0070.01114.71
7.2.250.0060.01314.84
7.2.240.0040.01115.09
7.2.230.0070.01015.09
7.2.220.0070.01115.15
7.2.210.0080.00614.94
7.2.200.0030.01314.94
7.2.190.0060.01214.75
7.2.180.0090.00914.86
7.2.170.0090.00614.73
7.2.160.0030.01014.76
7.2.150.0030.01216.77
7.2.140.0130.00316.76
7.2.130.0090.00616.75
7.2.120.0080.00516.82
7.2.110.0000.01516.79
7.2.100.0080.00816.85
7.2.90.0000.01016.58
7.2.80.0080.00716.83
7.2.70.0080.00816.96
7.2.60.0020.01216.64
7.2.50.0000.01016.94
7.2.40.0060.01216.53
7.2.30.0000.01216.94
7.2.20.0070.01016.94
7.2.10.0100.00716.65
7.2.00.0030.01017.84
7.1.330.0070.00715.35
7.1.320.0070.01015.43
7.1.310.0080.00415.52
7.1.300.0080.00315.76
7.1.290.0100.00015.77
7.1.280.0130.00315.27
7.1.270.0060.00915.65
7.1.260.0000.01015.46
7.1.250.0090.00315.72
7.1.240.0060.00615.71
7.1.230.0050.00515.48
7.1.220.0040.00415.52
7.1.210.0060.00615.67
7.1.200.0060.00615.59
7.1.190.0090.00015.59
7.1.180.0060.00915.55
7.1.170.0080.00815.74
7.1.160.0030.00615.76
7.1.150.0000.01515.56
7.1.140.0000.01115.76
7.1.130.0000.01415.44
7.1.120.0050.00515.49
7.1.110.0070.00715.71
7.1.100.0010.00816.73
7.1.90.0040.00715.72
7.1.80.0090.00015.68
7.1.70.0050.00816.30
7.1.60.0080.00817.43
7.1.50.0040.01416.27
7.1.40.0090.00015.83
7.1.30.0030.00815.59
7.1.20.0030.00715.55
7.1.10.0120.00015.69
7.1.00.0050.04018.93
7.0.330.0000.01115.29
7.0.320.0060.00315.24
7.0.310.0000.01015.40
7.0.300.0000.01715.20
7.0.290.0060.00914.92
7.0.280.0080.00315.13
7.0.270.0070.00715.10
7.0.260.0060.00615.23
7.0.250.0060.00615.11
7.0.240.0030.00615.43
7.0.230.0060.00915.32
7.0.220.0100.00615.32
7.0.210.0030.01015.42
7.0.200.0040.00616.01
7.0.190.0000.01315.39
7.0.180.0040.00415.37
7.0.170.0030.01115.04
7.0.160.0030.01015.37
7.0.150.0030.01115.14
7.0.140.0100.00315.41
7.0.130.0080.00315.39
7.0.120.0000.01015.42
7.0.110.0040.00715.31
7.0.100.0040.01115.25
7.0.90.0070.00715.42
7.0.80.0100.00315.46
7.0.70.0030.01015.25
7.0.60.0080.04317.58
7.0.50.0100.04216.64
7.0.40.0030.03916.68
7.0.30.0180.01816.78
7.0.20.0260.03316.69
7.0.10.0060.02516.71
7.0.00.0070.03516.89
5.6.400.0060.00614.33
5.6.390.0100.00313.84
5.6.380.0090.00314.53
5.6.370.0030.01014.20
5.6.360.0030.01214.03
5.6.350.0100.00313.98
5.6.340.0000.01314.33
5.6.330.0000.00914.30
5.6.320.0040.00814.57
5.6.310.0030.00614.26
5.6.300.0070.01014.27
5.6.290.0130.00314.54
5.6.280.0050.02317.69
5.6.270.0060.00614.26
5.6.260.0000.01713.96
5.6.250.0040.00414.20
5.6.240.0030.01014.22
5.6.230.0080.00814.30
5.6.220.0040.01114.17
5.6.210.0080.02817.36
5.6.200.0050.03116.26
5.6.190.0080.04717.44
5.6.180.0190.04117.53
5.6.170.0120.03317.33
5.6.160.0040.04517.21
5.6.150.0050.02516.16
5.6.140.0050.04516.25
5.6.130.0000.03916.33
5.6.120.0070.02817.70
5.6.110.0090.03517.51
5.6.100.0000.02817.76
5.6.90.0080.04417.61
5.6.80.0100.04217.38
5.6.70.0060.00514.11
5.6.60.0040.01114.07
5.6.50.0040.01114.37
5.6.40.0070.00314.40
5.6.30.0070.00714.19
5.6.20.0000.01614.12
5.6.10.0040.01414.17
5.6.00.0070.01014.21
5.5.380.0000.00914.42
5.5.370.0040.01514.44
5.5.360.0050.00514.46
5.5.350.2080.02017.34
5.5.340.0080.04516.15
5.5.330.0090.03717.23
5.5.320.0140.02617.34
5.5.310.0170.04017.30
5.5.300.0060.02116.18
5.5.290.0030.02516.17
5.5.280.0120.02517.34
5.5.270.0050.02317.56
5.5.260.0100.03117.66
5.5.250.0130.04017.34
5.5.240.0100.04217.19
5.5.230.0060.00314.10
5.5.220.0080.00814.18
5.5.210.0080.00414.27
5.5.200.0070.00714.14
5.5.190.0070.01014.20
5.5.180.0060.00913.88
5.5.170.0040.01113.95
5.5.160.0100.00614.30
5.5.150.0030.00614.26
5.5.140.0080.00313.93
5.5.130.0000.01414.16
5.5.120.0060.01014.28
5.5.110.0060.00314.14
5.5.100.0000.01214.11
5.5.90.0090.00314.30
5.5.80.0080.00314.33
5.5.70.0070.00314.00
5.5.60.0040.01114.23
5.5.50.0070.00414.15
5.5.40.0070.00713.94
5.5.30.0080.00414.18
5.5.20.0100.00714.20
5.5.10.0030.00914.32
5.5.00.0000.00814.27

preferences:
50.98 ms | 401 KiB | 5 Q