3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function foo($str) { $this->foobar($str); } private function foobar(string $str) { print "A"; if ($str !== "A") { $this->foobar("A"); // does never call B::foobar, as foobar is private } } } class B extends A { public function foobar(string $str) { print "B"; parent::foo("B"); } } (new A)->foo("A"); print PHP_EOL . "---" . PHP_EOL; (new B)->foo("B");

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.4.120.0060.00424.13
8.4.110.0030.00617.90
8.4.100.0160.00617.43
8.4.90.0140.00620.22
8.4.80.0090.01018.75
8.4.70.0030.00518.98
8.4.60.0130.00720.62
8.4.50.0090.01120.23
8.4.40.0100.01019.33
8.4.30.0190.00019.42
8.4.20.0140.00417.54
8.4.10.0040.00417.60
8.3.250.0100.00818.86
8.3.240.0110.00616.51
8.3.230.0080.01016.50
8.3.220.0100.00518.79
8.3.210.0090.00718.73
8.3.200.0030.00616.77
8.3.190.0050.00417.06
8.3.180.0110.00816.54
8.3.170.0130.00420.45
8.3.160.0110.00817.41
8.3.150.0060.01217.05
8.3.140.0040.00416.54
8.3.130.0060.00318.53
8.3.120.0030.00618.93
8.3.110.0110.00018.09
8.3.100.0030.00718.56
8.3.90.0090.00618.30
8.3.80.0090.00018.19
8.3.70.0110.00416.38
8.3.60.0150.00616.25
8.3.50.0120.00721.92
8.3.40.0180.00418.44
8.3.30.0130.00318.41
8.3.20.0040.00420.16
8.3.10.0040.00421.73
8.3.00.0030.00519.25
8.2.290.0090.01016.78
8.2.280.0090.01020.24
8.2.270.0090.00917.00
8.2.260.0120.00616.43
8.2.250.0080.00016.50
8.2.240.0090.00617.10
8.2.230.0100.00720.94
8.2.220.0000.00924.06
8.2.210.0080.00026.77
8.2.200.0060.00318.56
8.2.190.0070.00716.58
8.2.180.0120.00616.75
8.2.170.0070.01022.96
8.2.160.0030.01019.14
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0110.00020.47
8.2.120.0040.00426.35
8.2.110.0060.00322.23
8.2.100.0050.00517.78
8.2.90.0080.00019.05
8.2.80.0090.00317.97
8.2.70.0090.00017.63
8.2.60.0000.00817.88
8.2.50.0030.00518.10
8.2.40.0000.00821.93
8.2.30.0040.00419.02
8.2.20.0070.00018.00
8.2.10.0000.00718.16
8.2.00.0030.00318.11
8.1.330.0140.00515.91
8.1.320.0150.00516.31
8.1.310.0080.00016.55
8.1.300.0060.00318.68
8.1.290.0060.00318.88
8.1.280.0150.00425.92
8.1.270.0050.00324.02
8.1.260.0040.00426.35
8.1.250.0040.00828.09
8.1.240.0030.00624.05
8.1.230.0100.00017.83
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0030.00617.10
8.1.190.0060.00617.10
8.1.180.0040.00418.10
8.1.170.0040.00418.55
8.1.160.0070.00018.70
8.1.150.0070.00020.11
8.1.140.0040.00419.46
8.1.130.0030.00318.88
8.1.120.0000.00717.36
8.1.110.0040.00417.31
8.1.100.0040.00417.21
8.1.90.0070.00017.30
8.1.80.0080.00017.35
8.1.70.0050.00217.38
8.1.60.0060.00317.43
8.1.50.0030.00517.35
8.1.40.0040.00417.44
8.1.30.0080.00017.50
8.1.20.0070.00017.61
8.1.10.0070.00017.40
8.1.00.0000.00717.46
8.0.300.0100.00018.77
8.0.290.0080.00016.61
8.0.280.0000.00618.35
8.0.270.0040.00417.25
8.0.260.0000.00618.88
8.0.250.0000.00716.87
8.0.240.0000.00716.81
8.0.230.0070.00016.81
8.0.220.0000.00716.83
8.0.210.0030.00516.80
8.0.200.0030.00316.85
8.0.190.0000.00816.73
8.0.180.0050.00316.72
8.0.170.0040.00416.80
8.0.160.0040.00316.66
8.0.150.0050.00316.65
8.0.140.0050.00316.75
8.0.130.0040.00413.17
8.0.120.0000.00716.63
8.0.110.0030.00516.71
8.0.100.0070.00016.59
8.0.90.0000.00716.58
8.0.80.0060.00916.76
8.0.70.0070.00016.82
8.0.60.0070.00016.55
8.0.50.0030.00316.59
8.0.30.0120.00717.10
8.0.20.0110.00717.40
8.0.10.0040.00416.76
8.0.00.0160.00316.69
7.4.330.0000.00515.55
7.4.320.0000.00616.55
7.4.300.0030.00316.39
7.4.290.0000.00816.43
7.4.280.0040.00416.56
7.4.270.0070.00016.52
7.4.260.0000.00716.40
7.4.250.0000.00616.35
7.4.240.0000.00716.44
7.4.230.0000.00716.25
7.4.220.0100.01016.47
7.4.210.0040.01116.40
7.4.200.0030.00316.36
7.4.160.0110.00516.42
7.4.150.0110.00717.40
7.4.140.0100.01317.86
7.4.130.0100.01316.41
7.4.120.0110.00916.39
7.4.110.0060.01316.39
7.4.100.0080.00816.42
7.4.90.0040.01916.29
7.4.80.0040.01219.39
7.4.70.0090.01216.46
7.4.60.0030.01416.53
7.4.50.0100.00616.51
7.4.40.0110.00616.38
7.4.30.0060.01016.53
7.4.10.0090.00614.96
7.4.00.0040.01014.86
7.3.330.0000.00513.32
7.3.320.0000.00513.36
7.3.310.0030.00316.21
7.3.300.0030.00316.33
7.3.290.0090.00516.30
7.3.280.0080.00916.30
7.3.270.0050.01117.40
7.3.260.0110.01016.23
7.3.240.0120.00416.42
7.3.230.0070.01016.48
7.3.210.0140.00316.45
7.3.200.0090.00616.42
7.3.190.0130.00316.34
7.3.180.0090.01216.40
7.3.170.0030.01316.52
7.3.160.0120.00316.48
7.3.130.0060.01314.70
7.3.120.0080.01015.11
7.3.110.0070.01114.52
7.3.100.0060.00615.07
7.3.90.0070.00714.84
7.3.80.0060.00314.96
7.3.70.0090.00614.65
7.3.60.0060.00914.66
7.3.50.0030.00714.74
7.3.40.0040.01114.82
7.3.30.0110.00714.65
7.3.20.0000.00916.47
7.3.10.0120.00316.58
7.3.00.0060.00616.67
7.2.330.0090.00916.36
7.2.320.0100.01416.84
7.2.310.0130.00316.75
7.2.300.0100.00716.71
7.2.290.0060.00916.34
7.2.260.0060.01215.20
7.2.250.0090.00914.71
7.2.240.0070.00714.86
7.2.230.0030.01014.96
7.2.220.0000.01515.13
7.2.210.0040.00814.95
7.2.200.0140.00014.73
7.2.190.0030.00615.11
7.2.180.0040.00414.89
7.2.170.0090.00614.82
7.2.160.0000.01514.73
7.2.150.0000.01416.89
7.2.140.0070.01117.00
7.2.130.0000.01316.84
7.2.120.0060.01016.86
7.2.110.0080.00316.63
7.2.100.0100.00016.82
7.2.90.0030.01016.88
7.2.80.0030.01216.72
7.2.70.0090.00616.68
7.2.60.0030.01216.79
7.2.50.0000.01816.95
7.2.40.0060.00617.09
7.2.30.0000.01017.03
7.2.20.0070.00716.86
7.2.10.0030.00616.96
7.2.00.0080.00518.12
7.1.330.0090.00615.50
7.1.320.0120.00315.78
7.1.310.0030.00915.87
7.1.300.0040.01115.83
7.1.290.0030.01315.82
7.1.280.0090.00615.54
7.1.270.0000.01315.88
7.1.260.0030.01015.81
7.1.250.0060.00915.91
7.1.240.0040.00815.63
7.1.230.0000.00915.66
7.1.220.0070.00315.70
7.1.210.0030.01015.91
7.1.200.0050.01015.76
7.1.190.0040.00815.70
7.1.180.0040.01115.55
7.1.170.0070.00715.75
7.1.160.0000.01115.77
7.1.150.0100.00615.88
7.1.140.0060.00315.60
7.1.130.0000.01415.77
7.1.120.0110.00415.66
7.1.110.0000.01315.87
7.1.100.0030.00915.86
7.1.90.0100.00315.78
7.1.80.0030.00515.62
7.1.70.0020.00616.32
7.1.60.0060.00816.49
7.1.50.0080.01016.31
7.1.40.0420.00824.09
7.1.30.0520.01124.17
7.1.20.0520.01424.19
7.1.10.0020.01316.12
7.1.00.0490.00815.25
7.0.330.0040.01115.39
7.0.320.0000.00915.41
7.0.310.0100.00315.43
7.0.300.0070.00415.41
7.0.290.0040.00815.26
7.0.280.0090.00615.44
7.0.270.0000.01115.04
7.0.260.0000.01215.23
7.0.250.0040.00715.48
7.0.240.0030.00715.18
7.0.230.0030.01015.11
7.0.220.0000.00715.33
7.0.210.0130.00315.15
7.0.200.0020.01416.03
7.0.190.0050.00515.35
7.0.180.0510.00214.79
7.0.170.0520.01214.80
7.0.160.0280.01214.83
7.0.150.0260.00914.71
7.0.140.0240.01114.77
7.0.130.0050.01215.86
7.0.120.0050.00915.74
7.0.110.0050.01115.71
7.0.100.0380.00314.75
7.0.90.0330.01214.86
7.0.80.0340.00514.93
7.0.70.0270.00814.80
7.0.60.0350.00814.74
7.0.50.0230.01014.81
7.0.40.0090.00314.79
7.0.30.0270.00914.82
7.0.20.0330.01414.82
7.0.10.0570.01013.93
7.0.00.0180.01213.71
5.6.400.0000.00814.27
5.6.390.0040.01214.33
5.6.380.0070.00714.01
5.6.370.0050.00514.41
5.6.360.0000.00914.21
5.6.350.0120.00314.32
5.6.340.0100.00314.48
5.6.330.0040.00414.07
5.6.320.0030.01014.39
5.6.310.0100.00314.07
5.6.300.0000.01614.30
5.6.290.0120.00614.11
5.6.280.0030.01014.23
5.6.270.0000.00914.20
5.6.260.0100.00314.30
5.6.250.0140.00314.16
5.6.240.0080.00814.18
5.6.230.0070.01014.00
5.6.220.0040.00713.89
5.6.210.0090.00014.41
5.6.200.0070.00714.13
5.6.190.0160.00014.09
5.6.180.0040.01214.27
5.6.170.0030.00714.21
5.6.160.0040.00814.25
5.6.150.0110.00413.99
5.6.140.0070.00714.50
5.6.130.0100.00314.25
5.6.120.0030.00714.51
5.6.110.0090.00914.35
5.6.100.0100.01014.50
5.6.90.0000.01514.22
5.6.80.0090.00614.14
5.6.70.0070.01014.14
5.6.60.0060.01214.32
5.6.50.0060.01114.07
5.6.40.0080.00314.11
5.6.30.0080.00414.43
5.6.20.0040.00714.46
5.6.10.0040.01114.26
5.6.00.0060.00613.93

preferences:
136.53 ms | 403 KiB | 5 Q