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($obj, 'do_something'); $method->invoke($this, 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.70.0040.01818.46
8.3.60.0090.00916.50
8.3.50.0120.00922.12
8.3.40.0100.01018.75
8.3.30.0070.00718.71
8.3.20.0040.00420.36
8.3.10.0070.00021.91
8.3.00.0050.00319.79
8.2.190.0110.00316.58
8.2.180.0160.00018.13
8.2.170.0160.00322.96
8.2.160.0110.00320.46
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0090.00019.30
8.2.120.0080.00026.35
8.2.110.0060.00322.16
8.2.100.0130.00418.03
8.2.90.0000.00819.23
8.2.80.0040.00417.97
8.2.70.0000.00917.25
8.2.60.0000.00818.05
8.2.50.0030.00618.07
8.2.40.0060.00322.33
8.2.30.0000.00820.61
8.2.20.0070.00017.60
8.2.10.0040.00417.99
8.2.00.0070.00017.92
8.1.280.0120.00625.92
8.1.270.0030.00520.32
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0060.00923.92
8.1.230.0110.00017.52
8.1.220.0040.00417.79
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0030.00617.10
8.1.180.0030.00718.10
8.1.170.0000.00818.49
8.1.160.0020.00520.57
8.1.150.0000.00718.72
8.1.140.0080.00019.43
8.1.130.0000.00717.69
8.1.120.0040.00417.39
8.1.110.0000.00717.42
8.1.100.0000.00717.29
8.1.90.0000.00817.40
8.1.80.0040.00417.36
8.1.70.0000.00717.20
8.1.60.0080.00017.46
8.1.50.0000.00817.48
8.1.40.0050.00317.37
8.1.30.0040.00417.60
8.1.20.0040.00417.64
8.1.10.0030.00617.47
8.1.00.0020.00517.50
8.0.300.0070.00018.77
8.0.290.0040.00416.58
8.0.280.0000.00718.31
8.0.270.0050.00317.11
8.0.260.0030.00317.26
8.0.250.0040.00416.97
8.0.240.0050.00316.95
8.0.230.0050.00516.96
8.0.220.0040.00416.89
8.0.210.0070.00016.91
8.0.200.0030.00316.96
8.0.190.0060.00316.82
8.0.180.0070.00016.90
8.0.170.0040.00416.92
8.0.160.0000.00816.91
8.0.150.0070.00016.71
8.0.140.0040.00416.78
8.0.130.0030.00313.33
8.0.120.0050.00216.84
8.0.110.0050.00216.95
8.0.100.0000.00716.76
8.0.90.0000.00716.80
8.0.80.0030.01316.82
8.0.70.0030.00516.91
8.0.60.0000.00716.85
8.0.50.0040.00416.84
8.0.30.0150.00516.99
8.0.20.0070.01317.43
8.0.10.0040.00417.13
8.0.00.0070.01116.94
7.4.330.0050.00016.71
7.4.320.0000.00616.54
7.4.300.0040.00416.41
7.4.290.0070.00016.53
7.4.280.0000.00816.42
7.4.270.0000.00716.58
7.4.260.0040.00416.52
7.4.250.0050.00216.47
7.4.240.0030.00316.55
7.4.230.0000.00716.44
7.4.220.0120.00616.69
7.4.210.0060.00916.47
7.4.200.0020.00516.41
7.4.160.0090.00616.54
7.4.150.0100.00917.40
7.4.140.0100.01217.86
7.4.130.0030.01616.63
7.4.120.0100.00716.60
7.4.110.0070.01016.38
7.4.100.0120.00616.43
7.4.90.0030.01616.57
7.4.80.0100.00719.39
7.4.70.0000.01616.60
7.4.60.0090.01216.59
7.4.50.0040.01116.74
7.4.40.0100.00616.46
7.4.30.0060.01316.39
7.4.00.0000.01814.60
7.3.330.0000.00613.37
7.3.320.0050.00013.23
7.3.310.0040.00416.33
7.3.300.0000.00716.32
7.3.290.0100.00516.35
7.3.280.0060.00916.35
7.3.270.0060.01117.40
7.3.260.0110.00816.29
7.3.240.0110.00616.47
7.3.230.0080.01016.51
7.3.210.0090.01116.50
7.3.200.0090.00916.32
7.3.190.0170.00016.52
7.3.180.0090.01216.64
7.3.170.0130.00416.49
7.3.160.0120.00316.25
7.3.00.0090.00916.28
7.2.330.0060.01216.75
7.2.320.0060.01616.24
7.2.310.0140.00816.75
7.2.300.0080.00816.48
7.2.290.0150.00316.72
7.2.130.0090.00616.71
7.2.120.0060.00916.91
7.2.110.0060.01016.61
7.2.100.0070.01016.54
7.2.90.0080.00816.76
7.2.80.0120.00316.86
7.2.70.0150.00316.93
7.2.60.0120.00316.52
7.2.50.0130.00316.89
7.2.40.0090.00916.90
7.2.30.0080.00416.58
7.2.20.0080.00616.93
7.2.10.0120.00316.88
7.2.00.0100.00318.13
7.1.250.0090.00315.80
7.1.240.0060.00615.61
7.1.230.0120.00015.75
7.1.220.0150.00015.74
7.1.210.0090.00615.41
7.1.200.0040.01115.47
7.1.190.0100.00715.64
7.1.180.0100.00715.46
7.1.170.0040.01115.60
7.1.160.0080.00815.70
7.1.150.0090.00615.71
7.1.140.0110.00815.71
7.1.130.0060.00615.58
7.1.120.0060.00615.78
7.1.110.0110.00415.37
7.1.100.0070.00716.89
7.1.90.0140.00415.91
7.1.80.0110.00415.68
7.1.70.0080.00516.54
7.1.60.0100.00917.64
7.1.50.0110.00816.25
7.1.40.0120.00315.56
7.1.30.0040.00715.63
7.1.20.0150.00315.63
7.1.10.0040.01115.55
7.1.00.0030.04419.17
7.0.330.0160.00315.41
7.0.320.0120.01215.29
7.0.310.0120.01115.38
7.0.300.0120.00815.32
7.0.290.0070.01015.53
7.0.280.0150.00415.36
7.0.270.0090.01015.31
7.0.260.0030.01215.07
7.0.250.0090.00315.21
7.0.240.0130.00015.24
7.0.230.0100.00315.34
7.0.220.0130.00015.24
7.0.210.0110.00415.46
7.0.200.0050.00716.01
7.0.190.0060.00615.15
7.0.180.0100.00315.44
7.0.170.0060.00615.15
7.0.160.0060.00615.43
7.0.150.0070.00715.33
7.0.140.0070.00715.41
7.0.130.0090.00615.30
7.0.120.0140.00315.03
7.0.110.0100.00715.49
7.0.100.0120.04217.55
7.0.90.0100.04017.65
7.0.80.0130.02717.48
7.0.70.0100.02017.52
7.0.60.0110.01817.56
7.0.50.0150.03117.90
7.0.40.0070.04216.68
7.0.30.0060.02816.57
7.0.20.0070.04316.77
7.0.10.0070.03716.71
7.0.00.0030.04516.80
5.6.380.0040.00713.87
5.6.370.0040.00714.23
5.6.360.0050.00814.01
5.6.350.0030.00714.12
5.6.340.0040.00513.91
5.6.330.0070.00714.38
5.6.320.0070.01014.61
5.6.310.0050.01414.03
5.6.300.0090.00614.51
5.6.290.0030.01214.20
5.6.280.0060.02017.54
5.6.270.0070.01014.41
5.6.260.0030.00914.59
5.6.250.0070.04917.38
5.6.240.0090.02417.57
5.6.230.0110.03617.53
5.6.220.0070.04117.41
5.6.210.0070.04317.42
5.6.200.0060.03817.57
5.6.190.0070.02617.78
5.6.180.0050.03617.63
5.6.170.0140.03917.64
5.6.160.0050.03117.55
5.6.150.0120.04017.79
5.6.140.0100.04717.74
5.6.130.0060.04717.74
5.6.120.0120.03917.60
5.6.110.0080.04717.71
5.6.100.0220.02217.50
5.6.90.0150.04517.55
5.6.80.0160.02217.16
5.6.70.0100.04317.25
5.6.60.0090.03117.18
5.6.50.0140.04217.25
5.6.40.0100.04317.27
5.6.30.0120.04117.32
5.6.20.0100.04517.18
5.6.10.0180.03717.29
5.6.00.0070.04617.26
5.5.380.0060.03015.49
5.5.370.0120.03315.50
5.5.360.0090.03915.65
5.5.350.0040.03315.73
5.5.340.0030.03915.69
5.5.330.0080.03715.77
5.5.320.0050.03115.76
5.5.310.0080.04015.78
5.5.300.0090.04716.03
5.5.290.0140.03816.08
5.5.280.0070.04715.88
5.5.270.0140.04116.12
5.5.260.0160.03816.00
5.5.250.0110.04015.87
5.5.240.0090.04015.70
5.5.230.0070.02515.40
5.5.220.0160.01815.71
5.5.210.0100.04015.59
5.5.200.0060.02815.63
5.5.190.0110.02715.56
5.5.180.0070.04015.56
5.5.170.0050.01411.15
5.5.160.0070.02815.54
5.5.150.0120.04215.60
5.5.140.0110.03615.54
5.5.130.0060.04015.59
5.5.120.0080.02115.61
5.5.110.0100.03915.56
5.5.100.0060.04215.62
5.5.90.0110.03815.51
5.5.80.0140.03115.51
5.5.70.0140.02615.48
5.5.60.0020.04715.46
5.5.50.0050.04615.58
5.5.40.0050.04015.50
5.5.30.0100.02215.58
5.5.20.0050.03515.41
5.5.10.0050.04215.60
5.5.00.0060.04215.58

preferences:
60.27 ms | 401 KiB | 5 Q