3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { public 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.0090.00616.88
8.3.50.0210.00822.05
8.3.40.0040.01118.79
8.3.30.0150.00318.73
8.3.20.0040.00420.51
8.3.10.0000.00723.65
8.3.00.0030.00519.85
8.2.180.0080.00818.56
8.2.170.0150.00022.96
8.2.160.0100.00720.53
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00721.07
8.2.120.0060.00326.35
8.2.110.0100.01022.08
8.2.100.0070.00419.76
8.2.90.0090.00019.38
8.2.80.0000.00818.92
8.2.70.0050.00317.63
8.2.60.0050.00218.04
8.2.50.0000.00918.07
8.2.40.0050.00318.21
8.2.30.0030.00518.13
8.2.20.0050.00217.75
8.2.10.0040.00418.10
8.2.00.0040.00417.88
8.1.280.0070.00725.92
8.1.270.0080.00023.99
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0060.00320.31
8.1.230.0040.00717.58
8.1.220.0000.00817.77
8.1.210.0080.00018.77
8.1.200.0040.00417.35
8.1.190.0040.00417.38
8.1.180.0000.00818.10
8.1.170.0050.00318.51
8.1.160.0000.00718.88
8.1.150.0070.00018.80
8.1.140.0040.00419.45
8.1.130.0030.00317.61
8.1.120.0000.00817.40
8.1.110.0040.00417.41
8.1.100.0000.00817.38
8.1.90.0090.00017.44
8.1.80.0000.00717.31
8.1.70.0000.00717.32
8.1.60.0000.00817.57
8.1.50.0050.00317.38
8.1.40.0080.00017.42
8.1.30.0040.00417.70
8.1.20.0040.00417.49
8.1.10.0050.00317.49
8.1.00.0050.00217.49
8.0.300.0040.00418.77
8.0.290.0060.00316.88
8.0.280.0000.01018.37
8.0.270.0030.00317.27
8.0.260.0000.00617.18
8.0.250.0040.00316.98
8.0.240.0000.00817.01
8.0.230.0040.00416.96
8.0.220.0070.00016.92
8.0.210.0000.00816.92
8.0.200.0000.00616.86
8.0.190.0000.00817.03
8.0.180.0050.00316.90
8.0.170.0000.00816.95
8.0.160.0000.00716.95
8.0.150.0040.00416.82
8.0.140.0070.00416.72
8.0.130.0030.00313.38
8.0.120.0000.00816.86
8.0.110.0040.00416.93
8.0.100.0000.00816.90
8.0.90.0070.00016.76
8.0.80.0070.01016.86
8.0.70.0000.00716.79
8.0.60.0000.00816.98
8.0.50.0070.00016.98
8.0.30.0070.01217.06
8.0.20.0120.00617.40
8.0.10.0000.00917.05
8.0.00.0100.00816.89
7.4.330.0050.00016.83
7.4.320.0030.00316.54
7.4.300.0000.00716.62
7.4.290.0070.00016.51
7.4.280.0030.00516.66
7.4.270.0030.00316.47
7.4.260.0030.00316.52
7.4.250.0050.00216.40
7.4.240.0060.00116.65
7.4.230.0070.00016.53
7.4.220.0030.01516.54
7.4.210.0150.00016.66
7.4.200.0070.00016.70
7.4.160.0150.00016.46
7.4.150.0110.00617.40
7.4.140.0080.01217.86
7.4.130.0090.00816.55
7.4.120.0060.01416.72
7.4.110.0070.01716.67
7.4.100.0060.01016.55
7.4.90.0070.01016.68
7.4.80.0140.01019.39
7.4.70.0120.00916.44
7.4.60.0060.01116.37
7.4.50.0070.00716.58
7.4.40.0070.01316.38
7.4.30.0070.01616.47
7.4.10.0090.00715.11
7.4.00.0070.00914.93
7.3.330.0000.00613.36
7.3.320.0030.00313.22
7.3.310.0000.00716.17
7.3.300.0040.00416.35
7.3.290.0050.00916.35
7.3.280.0100.01016.34
7.3.270.0030.01717.40
7.3.260.0130.00616.52
7.3.250.0100.00816.46
7.3.240.0100.00916.46
7.3.230.0120.00616.39
7.3.210.0080.00816.41
7.3.200.0080.00816.32
7.3.190.0050.01116.37
7.3.180.0130.00716.54
7.3.170.0090.00916.33
7.3.160.0060.00916.41
7.3.130.0120.00514.91
7.3.120.0090.00714.75
7.3.110.0100.00814.94
7.3.100.0020.01214.66
7.3.90.0080.00714.79
7.3.80.0060.00514.78
7.3.70.0070.00814.72
7.3.60.0050.00814.57
7.3.50.0060.00314.77
7.3.40.0100.00514.69
7.3.30.0070.00614.70
7.3.20.0050.00516.69
7.3.10.0040.00916.43
7.3.00.0100.00516.62
7.2.330.0120.00616.40
7.2.320.0130.01016.73
7.2.310.0060.00916.84
7.2.300.0140.00316.43
7.2.290.0120.01216.46
7.2.260.0090.00914.99
7.2.250.0070.01114.92
7.2.240.0030.01115.03
7.2.230.0040.00914.97
7.2.220.0040.00914.70
7.2.210.0050.00714.88
7.2.200.0050.00815.13
7.2.190.0050.00814.73
7.2.180.0030.00714.88
7.2.170.0100.00814.79
7.2.160.0040.00914.94
7.2.150.0080.00616.69
7.2.140.0030.01416.87
7.2.130.0080.00916.68
7.2.120.0110.00316.81
7.2.110.0050.00816.85
7.2.100.0050.01016.85
7.2.90.0090.00216.95
7.2.80.0020.01116.89
7.2.70.0050.01016.80
7.2.60.0060.01016.70
7.2.50.0020.01116.75
7.2.40.0070.01016.80
7.2.30.0110.00716.87
7.2.20.0070.01016.89
7.2.10.0060.00316.64
7.2.00.0040.01017.64
7.1.330.0060.00915.78
7.1.320.0030.00815.74
7.1.310.0060.00515.56
7.1.300.0040.00715.54
7.1.290.0070.00915.51
7.1.280.0040.01015.46
7.1.270.0070.00915.53
7.1.260.0050.00815.52
7.1.250.0050.01115.58
7.1.240.0030.00815.59
7.1.230.0050.00715.75
7.1.220.0050.00815.49
7.1.210.0050.00815.75
7.1.200.0020.00915.61
7.1.190.0050.01015.61
7.1.180.0040.00815.57
7.1.170.0030.00815.65
7.1.160.0050.00715.78
7.1.150.0050.00715.75
7.1.140.0020.01415.65
7.1.130.0050.00715.51
7.1.120.0110.00515.34
7.1.110.0070.00415.60
7.1.100.0070.00716.51
7.1.90.0050.01015.73
7.1.80.0020.01315.66
7.1.70.0050.00416.12
7.1.60.0080.00716.68
7.1.50.0080.00715.92
7.1.40.0070.00715.44
7.1.30.0040.00615.57
7.1.20.0070.00715.65
7.1.10.0060.00615.51
7.1.00.0030.03117.89
7.0.330.0050.00815.38
7.0.320.0050.00715.20
7.0.310.0020.00815.20
7.0.300.0050.00515.35
7.0.290.0030.01015.15
7.0.280.0090.00315.36
7.0.270.0070.00415.29
7.0.260.0060.00515.34
7.0.250.0070.00715.08
7.0.240.0070.01015.16
7.0.230.0090.00615.23
7.0.220.0010.00715.37
7.0.210.0020.01115.39
7.0.200.0040.00815.81
7.0.190.0030.01015.27
7.0.180.0050.01015.40
7.0.170.0080.00315.32
7.0.160.0050.00615.08
7.0.150.0050.00615.37
7.0.140.0070.00315.34
7.0.130.0070.00715.31
7.0.120.0050.00615.48
7.0.110.0070.00915.40
7.0.100.0130.03316.97
7.0.90.0190.02916.86
7.0.80.0010.02316.92
7.0.70.0090.02416.83
7.0.60.0080.03116.89
7.0.50.0170.03217.07
7.0.40.0030.02315.85
7.0.30.0090.01915.75
7.0.20.0050.02015.67
7.0.10.0050.01915.79
7.0.00.0070.01715.71
5.6.400.0070.00714.29
5.6.390.0040.00914.49
5.6.380.0070.00214.29
5.6.370.0030.01214.17
5.6.360.0060.00814.54
5.6.350.0090.00514.22
5.6.340.0100.00714.40
5.6.330.0030.01014.29
5.6.320.0060.01114.31
5.6.310.0080.00514.46
5.6.300.0050.00714.63
5.6.290.0050.00914.54
5.6.280.0010.01816.52
5.6.270.0060.00614.13
5.6.260.0040.01214.32
5.6.250.0070.02316.55
5.6.240.0090.03116.47
5.6.230.0030.03616.42
5.6.220.0080.01816.19
5.6.210.0030.03116.39
5.6.200.0060.03316.51
5.6.190.0070.02916.54
5.6.180.0040.03016.51
5.6.170.0080.01816.37
5.6.160.0030.02216.46
5.6.150.0070.01716.62
5.6.140.0050.02016.57
5.6.130.0030.01916.56
5.6.120.0020.02316.47
5.6.110.0060.01716.64
5.6.100.0050.01916.40
5.6.90.0090.01416.61
5.6.80.0040.01816.22
5.6.70.0080.01916.35
5.6.60.0020.02016.40
5.6.50.0040.01916.31
5.6.40.0020.02116.30
5.6.30.0040.02216.29
5.6.20.0040.02216.21
5.6.10.0080.01616.25
5.6.00.0030.01916.21
5.5.380.0060.02916.27
5.5.370.0020.03616.20
5.5.360.0090.03116.13
5.5.350.0130.03116.09
5.5.340.0100.03116.50
5.5.330.0090.03016.44
5.5.320.0080.02616.35
5.5.310.0040.02816.60
5.5.300.0080.01416.33
5.5.290.0050.02016.39
5.5.280.0060.01916.56
5.5.270.0060.01916.45
5.5.260.0070.03116.47
5.5.250.0040.01916.37
5.5.240.0050.01916.31
5.5.230.0040.02016.25
5.5.220.0050.01716.09
5.5.210.0060.01616.14
5.5.200.0050.02116.20
5.5.190.0080.01816.30
5.5.180.0060.01616.29
5.5.170.0050.00714.10
5.5.160.0060.01616.17
5.5.150.0050.01816.09
5.5.140.0040.02016.13
5.5.130.0030.02016.13
5.5.120.0060.01716.01
5.5.110.0030.01816.03
5.5.100.0050.01816.13
5.5.90.0030.02116.25
5.5.80.0050.01916.21
5.5.70.0000.02216.22
5.5.60.0050.01716.11
5.5.50.0040.01716.13
5.5.40.0060.01815.96
5.5.30.0050.02016.12
5.5.20.0070.01716.04
5.5.10.0060.01615.94
5.5.00.0090.01916.04

preferences:
48.99 ms | 401 KiB | 5 Q