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($b, 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.0120.00416.79
8.3.60.0130.00316.63
8.3.50.0090.01222.11
8.3.40.0110.00718.84
8.3.30.0000.01418.60
8.3.20.0080.00020.16
8.3.10.0040.00421.90
8.3.00.0040.00419.91
8.2.190.0130.00316.71
8.2.180.0120.00318.67
8.2.170.0040.01522.96
8.2.160.0100.00720.43
8.2.150.0080.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00921.04
8.2.120.0050.00326.35
8.2.110.0060.00322.30
8.2.100.0100.00717.80
8.2.90.0060.00319.07
8.2.80.0050.00317.97
8.2.70.0060.00317.50
8.2.60.0050.00317.93
8.2.50.0060.00318.07
8.2.40.0060.00322.32
8.2.30.0000.00720.54
8.2.20.0060.00317.68
8.2.10.0070.00017.89
8.2.00.0020.00518.04
8.1.280.0110.00725.92
8.1.270.0080.00020.24
8.1.260.0060.00328.09
8.1.250.0070.00028.09
8.1.240.0000.00923.92
8.1.230.0080.00417.64
8.1.220.0000.00917.74
8.1.210.0080.00018.77
8.1.200.0030.00917.36
8.1.190.0080.00017.22
8.1.180.0080.00018.10
8.1.170.0080.00018.50
8.1.160.0040.00420.64
8.1.150.0000.00818.75
8.1.140.0000.00819.53
8.1.130.0000.00717.52
8.1.120.0000.00717.26
8.1.110.0000.00717.37
8.1.100.0040.00417.42
8.1.90.0000.00817.37
8.1.80.0040.00417.43
8.1.70.0040.00417.23
8.1.60.0040.00417.59
8.1.50.0060.00317.52
8.1.40.0000.00817.41
8.1.30.0030.00617.65
8.1.20.0050.00217.58
8.1.10.0080.00017.62
8.1.00.0040.00417.48
8.0.300.0070.00018.77
8.0.290.0040.00416.58
8.0.280.0000.00718.45
8.0.270.0070.00017.11
8.0.260.0000.00617.11
8.0.250.0000.00716.96
8.0.240.0030.00316.98
8.0.230.0040.00416.86
8.0.220.0000.00816.77
8.0.210.0040.00416.81
8.0.200.0000.00616.84
8.0.190.0070.00516.96
8.0.180.0000.00716.90
8.0.170.0080.00016.80
8.0.160.0030.00316.79
8.0.150.0070.00016.78
8.0.140.0030.00516.74
8.0.130.0000.00613.28
8.0.120.0070.00016.89
8.0.110.0040.00416.88
8.0.100.0070.00016.93
8.0.90.0000.00716.88
8.0.80.0090.00616.91
8.0.70.0070.00016.80
8.0.60.0000.00816.86
8.0.50.0070.00016.91
8.0.30.0130.00717.08
8.0.20.0140.00517.40
8.0.10.0030.00617.06
8.0.00.0060.01016.89
7.4.330.0020.00216.73
7.4.320.0000.00616.40
7.4.300.0000.00616.50
7.4.290.0030.00316.61
7.4.280.0080.00016.51
7.4.270.0040.00416.67
7.4.260.0070.00016.48
7.4.250.0050.00316.56
7.4.240.0060.00116.58
7.4.230.0030.00316.53
7.4.220.0160.01316.60
7.4.210.0000.01516.69
7.4.200.0000.00816.69
7.4.160.0040.01216.38
7.4.150.0130.00617.40
7.4.140.0080.01117.86
7.4.130.0110.00716.47
7.4.120.0120.00816.66
7.4.110.0070.01116.66
7.4.100.0060.01216.59
7.4.90.0070.01116.41
7.4.80.0030.01419.39
7.4.70.0120.00416.55
7.4.60.0110.00616.54
7.4.50.0030.01316.36
7.4.40.0100.00616.59
7.4.30.0110.01116.49
7.4.10.0030.01315.29
7.4.00.0100.00814.88
7.3.330.0000.00613.36
7.3.320.0000.00513.23
7.3.310.0070.00016.39
7.3.300.0070.00016.30
7.3.290.0070.00816.37
7.3.280.0080.00916.38
7.3.270.0130.00317.40
7.3.260.0040.01816.48
7.3.240.0090.00916.41
7.3.230.0120.01216.39
7.3.210.0220.00016.47
7.3.200.0080.01216.46
7.3.190.0030.01316.58
7.3.180.0070.01016.46
7.3.170.0110.01116.47
7.3.160.0110.00416.32
7.3.130.0070.01014.84
7.3.120.0100.01014.96
7.3.110.0100.01014.89
7.3.100.0090.00614.93
7.3.90.0000.01414.58
7.3.80.0120.00314.84
7.3.70.0030.00914.59
7.3.60.0030.01014.91
7.3.50.0030.00614.88
7.3.40.0040.01114.62
7.3.30.0060.00914.82
7.3.20.0090.00316.63
7.3.10.0000.01616.77
7.3.00.0000.01516.42
7.2.330.0080.00916.30
7.2.320.0110.01116.68
7.2.310.0100.01016.74
7.2.300.0060.01016.72
7.2.290.0140.00416.63
7.2.260.0040.01515.05
7.2.250.0030.01614.54
7.2.240.0040.01215.00
7.2.230.0030.01515.10
7.2.220.0000.01614.86
7.2.210.0070.01014.77
7.2.200.0060.00315.03
7.2.190.0100.00614.99
7.2.180.0030.01015.05
7.2.170.0090.00615.02
7.2.160.0060.00815.00
7.2.150.0070.01016.88
7.2.140.0060.00916.58
7.2.130.0130.00016.66
7.2.120.0120.00016.66
7.2.110.0030.00616.80
7.2.100.0070.00716.82
7.2.90.0070.00716.80
7.2.80.0080.00416.91
7.2.70.0070.00717.00
7.2.60.0030.01116.96
7.2.50.0070.01016.72
7.2.40.0080.00816.87
7.2.30.0090.00616.91
7.2.20.0100.00316.50
7.2.10.0030.01016.61
7.2.00.0080.00317.85
7.1.330.0070.00715.79
7.1.320.0030.01115.73
7.1.310.0070.00715.59
7.1.300.0130.00715.70
7.1.290.0140.00015.67
7.1.280.0120.00015.72
7.1.270.0030.00615.80
7.1.260.0040.00715.68
7.1.250.0040.00715.64
7.1.240.0030.01015.68
7.1.230.0100.00315.35
7.1.220.0090.00615.67
7.1.210.0000.00915.63
7.1.200.0060.00815.63
7.1.190.0070.01015.54
7.1.180.0040.01115.65
7.1.170.0040.01115.62
7.1.160.0100.00315.57
7.1.150.0060.00915.62
7.1.140.0060.00315.71
7.1.130.0060.00615.52
7.1.120.0070.01015.68
7.1.110.0070.00315.72
7.1.100.0070.00516.85
7.1.90.0070.00715.69
7.1.80.0090.00615.44
7.1.70.0020.01016.08
7.1.60.0110.00717.49
7.1.50.0080.01016.38
7.1.40.0060.01015.79
7.1.30.0030.00615.67
7.1.20.0130.00015.73
7.1.10.0040.00815.64
7.1.00.0040.04119.08
7.0.330.0060.00315.25
7.0.320.0140.00315.35
7.0.310.0090.00615.25
7.0.300.0100.00315.43
7.0.290.0060.00615.23
7.0.280.0080.00615.13
7.0.270.0030.01015.41
7.0.260.0040.00415.33
7.0.250.0030.00615.44
7.0.240.0060.00915.30
7.0.230.0100.00315.16
7.0.220.0040.01115.50
7.0.210.0040.00715.31
7.0.200.0020.00915.99
7.0.190.0140.00015.37
7.0.180.0090.00315.52
7.0.170.0000.01515.49
7.0.160.0110.00415.16
7.0.150.0040.00815.38
7.0.140.0100.00315.38
7.0.130.0000.00715.30
7.0.120.0040.00415.12
7.0.110.0090.00315.21
7.0.100.0000.00915.13
7.0.90.0000.01015.55
7.0.80.0100.00015.45
7.0.70.0060.00315.27
7.0.60.0110.01917.68
7.0.50.0100.03716.47
7.0.40.0030.03016.90
7.0.30.0250.03816.79
7.0.20.0170.04316.70
7.0.10.0080.04516.74
7.0.00.0110.04116.64
5.6.400.0130.00014.25
5.6.390.0070.00314.16
5.6.380.0040.01114.18
5.6.370.0040.01414.34
5.6.360.0000.01414.19
5.6.350.0110.00314.54
5.6.340.0070.00714.67
5.6.330.0040.01214.69
5.6.320.0040.01114.43
5.6.310.0100.00314.28
5.6.300.0090.00014.27
5.6.290.0030.01013.91
5.6.280.0020.02617.47
5.6.270.0040.00714.48
5.6.260.0140.00014.45
5.6.250.0060.00914.43
5.6.240.0040.00714.37
5.6.230.0110.00414.11
5.6.220.0070.01014.44
5.6.210.0030.03417.44
5.6.200.0070.04116.02
5.6.190.0070.02617.43
5.6.180.0130.04117.38
5.6.170.0150.03217.44
5.6.160.0080.04017.37
5.6.150.0030.04916.22
5.6.140.0020.03216.19
5.6.130.0080.03016.22
5.6.120.0060.04617.64
5.6.110.0030.04717.48
5.6.100.0030.02817.62
5.6.90.0070.04817.63
5.6.80.0030.04117.29
5.6.70.0040.00414.12
5.6.60.0060.00314.00
5.6.50.0060.00614.42
5.6.40.0050.00314.38
5.6.30.0090.00314.57
5.6.20.0070.01014.18
5.6.10.0070.01014.23
5.6.00.0060.01214.11
5.5.380.0030.01214.19
5.5.370.0030.01413.93
5.5.360.0070.00714.32
5.5.350.0120.04117.28
5.5.340.0070.02215.96
5.5.330.0030.04617.31
5.5.320.0290.03217.29
5.5.310.0100.04717.36
5.5.300.0090.03216.12
5.5.290.0150.03616.08
5.5.280.0070.02517.51
5.5.270.0030.04317.52
5.5.260.0060.04617.46
5.5.250.0050.03017.34
5.5.240.1680.01817.25
5.5.230.0050.00514.24
5.5.220.0040.00714.12
5.5.210.0070.00713.97
5.5.200.0000.00813.95
5.5.190.0060.01014.32
5.5.180.0060.01314.03
5.5.170.0100.00614.29
5.5.160.0040.01213.96
5.5.150.0060.00314.35
5.5.140.0080.00413.84
5.5.130.0060.00613.89
5.5.120.0040.01114.24
5.5.110.0030.00613.95
5.5.100.0030.01313.84
5.5.90.0030.01014.35
5.5.80.0030.00914.12
5.5.70.0140.00013.94
5.5.60.0040.00414.04
5.5.50.0080.00014.31
5.5.40.0030.00914.07
5.5.30.0040.01214.27
5.5.20.0080.00814.09
5.5.10.0070.00713.88
5.5.00.0000.01513.98

preferences:
64.22 ms | 401 KiB | 5 Q