3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { private function do_something (bool $str) { echo "private function"; } public function call_something(foo $obj) { $method = new ReflectionMethod($this, 'do_something'); $method->invoke($obj, true); } } class bar extends foo { public function do_something (bool $value) { echo "subclass"; } } $a = new foo(); $b = new bar(); $b->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.40.0090.00918.84
8.3.30.0120.00318.84
8.3.20.0040.00420.39
8.3.10.0080.00021.63
8.3.00.0080.00019.91
8.2.170.0060.01322.96
8.2.160.0120.00320.11
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0030.00519.19
8.2.120.0080.00026.35
8.2.110.0030.00622.07
8.2.100.0030.00917.90
8.2.90.0040.00419.05
8.2.80.0090.00017.97
8.2.70.0030.00617.50
8.2.60.0000.00818.04
8.2.50.0000.00918.07
8.2.40.0090.00022.32
8.2.30.0000.00720.62
8.2.20.0030.00517.79
8.2.10.0040.00417.86
8.2.00.0040.00417.99
8.1.270.0090.00020.39
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0060.00323.96
8.1.230.0090.00317.77
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0000.00817.25
8.1.180.0040.00418.10
8.1.170.0040.00418.52
8.1.160.0050.00220.65
8.1.150.0000.00818.86
8.1.140.0000.00819.42
8.1.130.0080.00017.64
8.1.120.0030.00317.32
8.1.110.0000.00817.30
8.1.100.0040.00417.29
8.1.90.0050.00317.30
8.1.80.0040.00417.31
8.1.70.0030.00317.29
8.1.60.0030.00617.48
8.1.50.0000.00817.52
8.1.40.0030.00617.53
8.1.30.0000.00917.72
8.1.20.0000.00817.58
8.1.10.0070.00017.47
8.1.00.0040.00417.55
8.0.300.0070.00018.77
8.0.290.0070.00016.75
8.0.280.0030.00318.37
8.0.270.0000.00817.18
8.0.260.0060.00017.26
8.0.250.0030.00316.86
8.0.240.0000.00716.85
8.0.230.0060.00316.84
8.0.220.0080.00016.80
8.0.210.0000.00716.90
8.0.200.0040.00416.88
8.0.190.0000.01216.96
8.0.180.0030.00316.83
8.0.170.0060.00316.80
8.0.160.0030.00616.93
8.0.150.0000.00716.77
8.0.140.0040.00416.76
8.0.130.0000.00513.37
8.0.120.0030.00616.82
8.0.110.0000.00716.88
8.0.100.0050.00216.89
8.0.90.0000.00716.72
8.0.80.0060.00916.84
8.0.70.0000.00816.77
8.0.60.0000.00716.96
8.0.50.0040.00416.88
8.0.30.0110.00817.21
8.0.20.0110.00917.40
8.0.10.0050.00216.90
8.0.00.0080.01016.71
7.4.330.0030.00316.71
7.4.320.0060.00016.51
7.4.300.0030.00316.40
7.4.290.0030.00316.58
7.4.280.0050.00216.55
7.4.270.0000.00716.52
7.4.260.0000.00716.50
7.4.250.0050.00316.46
7.4.240.0030.00516.60
7.4.230.0040.00416.63
7.4.220.0090.00916.50
7.4.210.0060.01316.55
7.4.200.0030.00316.35
7.4.160.0090.00616.63
7.4.150.0120.00617.40
7.4.140.0160.00517.86
7.4.130.0060.01216.41
7.4.120.0110.00716.42
7.4.110.0100.00716.57
7.4.100.0120.01216.50
7.4.90.0140.00316.37
7.4.80.0130.01019.39
7.4.70.0060.00916.54
7.4.60.0060.01016.57
7.4.50.0000.01216.48
7.4.40.0160.00016.49
7.4.30.0070.01016.50
7.4.00.0060.00614.95
7.3.330.0060.00013.39
7.3.320.0050.00013.42
7.3.310.0020.00516.40
7.3.300.0000.00716.24
7.3.290.0060.00916.36
7.3.280.0080.00916.36
7.3.270.0130.00317.40
7.3.260.0040.01316.54
7.3.240.0120.00416.43
7.3.230.0100.00716.39
7.3.210.0150.00316.50
7.3.200.0130.00316.59
7.3.190.0030.01416.60
7.3.180.0130.00316.45
7.3.170.0060.01116.57
7.3.160.0090.00816.37
7.2.330.0100.00716.45
7.2.320.0030.01716.59
7.2.310.0060.01016.40
7.2.300.0060.01216.68
7.2.290.0070.01116.58
7.2.60.0040.01116.78
7.2.00.0070.00719.39
7.1.200.0130.00015.75
7.1.100.0000.00918.18
7.1.70.0040.00416.89
7.1.60.0120.01219.44
7.1.50.0130.01016.57
7.1.00.0070.07322.31
7.0.200.0100.00016.72
7.0.60.0030.04019.98
7.0.50.0130.06317.97
7.0.40.0130.07019.96
7.0.30.0230.06020.09
7.0.20.0300.08020.10
7.0.10.0100.08320.23
7.0.00.0030.05320.06
5.6.280.0000.03320.79
5.6.210.0030.06320.71
5.6.200.0200.07318.29
5.6.190.0100.08320.62
5.6.180.0070.06020.39
5.6.170.0370.08020.57
5.6.160.0170.07720.44
5.6.150.0030.05018.19
5.6.140.0030.07018.18
5.6.130.0170.06318.27
5.6.120.0030.05321.00
5.6.110.0200.06021.00
5.6.100.0070.08021.02
5.6.90.0170.06720.89
5.6.80.0030.05020.38
5.5.350.0170.07020.40
5.5.340.0030.04017.99
5.5.330.0070.09020.44
5.5.320.0330.07020.28
5.5.310.0100.04720.31
5.5.300.0070.08018.02
5.5.290.0070.08018.02
5.5.280.0030.04020.81
5.5.270.0070.04320.65
5.5.260.0070.06720.68
5.5.250.0170.07320.71
5.5.240.3970.03720.20

preferences:
39.23 ms | 400 KiB | 5 Q