3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private function do_something (bool $str) { echo "private function"; } public function call_something(A $obj) { //call_user_func([$obj, 'do_something'], true); $obj->do_something(true); } } class B extends A { public function do_something (string $value) { echo "subclass"; } } class C extends B { private function do_something (string $value) { echo "subclass"; } } $a = new A(); $c = new C(); $c->call_something($a);

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.0100.00716.63
8.3.50.0070.00718.20
8.3.40.0090.00918.67
8.3.30.0110.00318.53
8.3.20.0040.00420.16
8.3.10.0040.00421.90
8.3.00.0000.00819.49
8.2.180.0150.00416.50
8.2.170.0090.00922.96
8.2.160.0080.00620.36
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0040.00419.27
8.2.120.0040.00426.35
8.2.110.0080.00022.08
8.2.100.0070.00717.91
8.2.90.0070.00019.09
8.2.80.0080.00017.97
8.2.70.0060.00317.50
8.2.60.0000.00817.90
8.2.50.0050.00318.07
8.2.40.0090.00022.32
8.2.30.0040.00420.61
8.2.20.0070.00017.55
8.2.10.0070.00017.80
8.2.00.0000.00717.79
8.1.270.0050.00320.25
8.1.260.0050.00328.09
8.1.250.0040.00428.09
8.1.240.0100.00023.95
8.1.230.0110.00017.70
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0060.00317.23
8.1.190.0000.00817.11
8.1.180.0000.00818.10
8.1.170.0050.00318.52
8.1.160.0000.00720.51
8.1.150.0000.00718.75
8.1.140.0000.00819.44
8.1.130.0000.00817.55
8.1.120.0030.00617.23
8.1.110.0000.00817.21
8.1.100.0080.00017.28
8.1.90.0000.00817.28
8.1.80.0050.00217.25
8.1.70.0000.00717.13
8.1.60.0000.00717.44
8.1.50.0030.00517.42
8.1.40.0040.00417.37
8.1.30.0030.00517.58
8.1.20.0000.00717.53
8.1.10.0070.00017.36
8.1.00.0070.00017.20
8.0.300.0000.00718.77
8.0.290.0040.00416.58
8.0.280.0000.00818.23
8.0.270.0040.00417.03
8.0.260.0000.00717.08
8.0.250.0000.00716.77
8.0.240.0030.00316.88
8.0.230.0080.00316.92
8.0.220.0000.00716.81
8.0.210.0050.00216.84
8.0.200.0050.00316.87
8.0.190.0000.01116.88
8.0.180.0030.00316.75
8.0.170.0000.00716.73
8.0.160.0000.00716.83
8.0.150.0000.00716.81
8.0.140.0000.00716.77
8.0.130.0000.00513.24
8.0.120.0050.00316.84
8.0.110.0000.00716.75
8.0.100.0000.00716.74
8.0.90.0000.00716.71
8.0.80.0060.01316.84
8.0.70.0040.00416.93
8.0.60.0000.00816.84
8.0.50.0070.00016.69
8.0.30.0140.00516.75
8.0.20.0100.00717.40
8.0.10.0030.00316.89
8.0.00.0090.00916.64
7.4.330.0060.00016.66
7.4.320.0080.00016.48
7.4.300.0000.00716.48
7.4.290.0030.00316.28
7.4.280.0040.00416.36
7.4.270.0060.00016.35
7.4.260.0040.00416.45
7.4.250.0070.00016.44
7.4.240.0060.00116.42
7.4.230.0030.00316.43
7.4.220.0130.00316.52
7.4.210.0080.00616.57
7.4.200.0000.00716.19
7.4.160.0060.00916.39
7.4.150.0070.01017.40
7.4.140.0100.00817.86
7.4.130.0130.01016.36
7.4.120.0100.00916.28
7.4.110.0110.00616.52
7.4.100.0100.01316.37
7.4.90.0070.01016.16
7.4.80.0070.01019.39
7.4.70.0030.01316.37
7.4.60.0000.01616.43
7.4.50.0070.01016.24
7.4.40.0140.00716.22
7.4.30.0030.01516.36
7.4.00.0070.01114.68
7.3.330.0000.00513.22
7.3.320.0060.00013.25
7.3.310.0070.00016.17
7.3.300.0030.00316.20
7.3.290.0120.00416.24
7.3.280.0110.00816.19
7.3.270.0090.00817.40
7.3.260.0030.01516.25
7.3.240.0110.00616.36
7.3.230.0130.00416.39
7.3.210.0040.01216.43
7.3.200.0160.00616.42
7.3.190.0160.00616.24
7.3.180.0100.00616.20
7.3.170.0080.00816.27
7.3.160.0060.01016.31
7.2.330.0040.01416.25
7.2.320.0100.01316.31
7.2.310.0030.01316.43
7.2.300.0060.01216.61
7.2.290.0030.01316.32
7.2.60.0060.00316.49
7.2.00.0000.01319.02
7.1.200.0000.01315.55
7.1.100.0060.00618.02
7.1.70.0030.00717.05
7.1.60.0130.01319.44
7.1.50.0090.01316.88
7.1.00.0030.07722.54
7.0.200.0070.00316.75
7.0.60.0130.05319.94
7.0.50.0130.05317.93
7.0.40.0070.04320.02
7.0.30.0300.06720.23
7.0.20.0270.09020.23
7.0.10.0130.06020.10
7.0.00.0030.04720.06
5.6.280.0000.07321.08
5.6.210.0100.05320.62
5.6.200.0070.05718.12
5.6.190.0170.03320.48
5.6.180.0170.07020.39
5.6.170.0300.06720.62
5.6.160.0000.06720.57
5.6.150.0070.03718.16
5.6.140.0030.05018.18
5.6.130.0030.05018.28
5.6.120.0100.04721.00
5.6.110.0130.07321.12
5.6.100.0100.07321.12
5.6.90.0200.07721.01
5.6.80.0130.08020.38
5.5.350.0100.07020.41
5.5.340.0070.08317.96
5.5.330.0030.06020.35
5.5.320.0300.07720.31
5.5.310.0100.04720.20
5.5.300.0030.08717.96
5.5.290.0070.08318.08
5.5.280.0030.04020.89
5.5.270.0000.05020.80
5.5.260.0030.04720.88
5.5.250.0070.06020.70
5.5.240.3930.03720.16

preferences:
62.66 ms | 400 KiB | 5 Q