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(foo $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 foo(); $c = new bar(); $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.0110.00716.63
8.3.50.0130.00521.91
8.3.40.0090.00618.84
8.3.30.0030.01018.44
8.3.20.0080.00020.32
8.3.10.0000.00721.89
8.3.00.0030.00619.78
8.2.180.0110.01116.32
8.2.170.0160.00322.96
8.2.160.0070.00720.39
8.2.150.0110.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00019.24
8.2.120.0080.00026.35
8.2.110.0060.00322.29
8.2.100.0120.00317.66
8.2.90.0000.00819.05
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0030.00617.80
8.2.50.0000.00818.07
8.2.40.0040.00422.15
8.2.30.0070.00020.52
8.2.20.0000.00717.53
8.2.10.0000.00717.98
8.2.00.0000.00717.84
8.1.280.0090.00625.92
8.1.270.0040.00420.23
8.1.260.0000.00828.09
8.1.250.0000.00728.09
8.1.240.0040.00423.79
8.1.230.0110.00017.76
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.13
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0000.00818.52
8.1.160.0020.00520.70
8.1.150.0080.00018.71
8.1.140.0050.00319.48
8.1.130.0030.00317.50
8.1.120.0070.00017.39
8.1.110.0040.00417.21
8.1.100.0070.00017.31
8.1.90.0040.00417.27
8.1.80.0070.00017.28
8.1.70.0030.00317.21
8.1.60.0070.00017.45
8.1.50.0040.00417.44
8.1.40.0030.00517.38
8.1.30.0000.00817.46
8.1.20.0000.00717.51
8.1.10.0000.00717.30
8.1.00.0040.00417.29
8.0.300.0020.00518.77
8.0.290.0080.00016.63
8.0.280.0070.00018.37
8.0.270.0000.00717.01
8.0.260.0000.00617.12
8.0.250.0060.00016.78
8.0.240.0050.00316.92
8.0.230.0030.00616.75
8.0.220.0000.00816.80
8.0.210.0000.00716.72
8.0.200.0050.00216.78
8.0.190.0050.00516.85
8.0.180.0080.00016.75
8.0.170.0000.00816.88
8.0.160.0080.00016.89
8.0.150.0040.00416.72
8.0.140.0030.00316.66
8.0.130.0050.00013.25
8.0.120.0000.00816.81
8.0.110.0040.00416.86
8.0.100.0000.00816.64
8.0.90.0040.00416.68
8.0.80.0070.01316.74
8.0.70.0000.00816.71
8.0.60.0000.00716.93
8.0.50.0000.00816.84
8.0.30.0070.01116.96
8.0.20.0100.01117.40
8.0.10.0050.00216.77
8.0.00.0090.01016.50
7.4.330.0000.00516.84
7.4.320.0030.00316.23
7.4.300.0000.00616.36
7.4.290.0060.00016.48
7.4.280.0050.00316.48
7.4.270.0030.00316.31
7.4.260.0030.00316.39
7.4.250.0070.00316.43
7.4.240.0020.00516.42
7.4.230.0070.00016.34
7.4.220.0030.01416.36
7.4.210.0090.00916.53
7.4.200.0030.00316.39
7.4.160.0130.00316.23
7.4.150.0120.00817.40
7.4.140.0080.01017.86
7.4.130.0110.01116.29
7.4.120.0080.01016.31
7.4.110.0110.00716.55
7.4.100.0170.00716.49
7.4.90.0060.01216.36
7.4.80.0130.00619.39
7.4.70.0030.01816.46
7.4.60.0030.01316.35
7.4.50.0030.01016.39
7.4.40.0090.00916.30
7.4.30.0060.01116.28
7.4.00.0070.01014.64
7.3.330.0050.00013.23
7.3.320.0050.00013.21
7.3.310.0060.00016.19
7.3.300.0070.00016.27
7.3.290.0040.01116.21
7.3.280.0120.00916.24
7.3.270.0100.01017.40
7.3.260.0120.01216.16
7.3.240.0060.01116.33
7.3.230.0120.00316.39
7.3.210.0100.00716.45
7.3.200.0060.01016.07
7.3.190.0060.00916.16
7.3.180.0140.00316.39
7.3.170.0120.00916.27
7.3.160.0110.00716.25
7.3.10.0070.00416.62
7.3.00.0090.00316.34
7.2.330.0100.00716.52
7.2.320.0070.01716.18
7.2.310.0070.01016.25
7.2.300.0110.00616.22
7.2.290.0070.01016.63
7.2.130.0080.00416.68
7.2.120.0040.00916.58
7.2.110.0020.01116.56
7.2.100.0110.00516.62
7.2.90.0080.00416.69
7.2.80.0070.00716.55
7.2.70.0030.01116.57
7.2.60.0080.00416.72
7.2.50.0030.01116.67
7.2.40.0040.00916.71
7.2.30.0100.00716.74
7.2.20.0060.00716.68
7.2.10.0050.01016.56
7.2.00.0040.01017.22
7.1.250.0000.01415.54
7.1.240.0110.00015.68
7.1.230.0050.00915.62
7.1.220.0080.00615.53
7.1.210.0020.01215.34
7.1.200.0050.00915.50
7.1.190.0040.00615.40
7.1.180.0060.00615.35
7.1.170.0050.00715.52
7.1.160.0040.00615.63
7.1.150.0050.00915.54
7.1.140.0070.00715.61
7.1.130.0030.01115.40
7.1.120.0060.00815.46
7.1.110.0050.00415.50
7.1.100.0080.00416.27
7.1.90.0070.00415.49
7.1.80.0050.01115.55
7.1.70.0060.00515.95
7.1.60.0050.01016.81
7.1.50.0070.00715.82
7.1.40.0070.00515.42
7.1.30.0050.00815.48
7.1.20.0050.00915.46
7.1.10.0100.00215.62
7.1.00.0040.03117.88
7.0.330.0060.00615.34
7.0.320.0050.00915.13
7.0.310.0030.01015.42
7.0.300.0090.00515.33
7.0.290.0030.01015.35
7.0.280.0030.01015.16
7.0.270.0060.00815.28
7.0.260.0060.00715.20
7.0.250.0060.00615.27
7.0.240.0070.00715.33
7.0.230.0110.00315.19
7.0.220.0070.00515.28
7.0.210.0020.01015.13
7.0.200.0050.00715.68
7.0.190.0050.00315.29
7.0.180.0060.00715.27
7.0.170.0090.00615.15
7.0.160.0060.00715.36
7.0.150.0090.00315.36
7.0.140.0090.00615.35
7.0.130.0060.00615.17
7.0.120.0060.00715.38
7.0.110.0060.00515.22
7.0.100.0070.00515.18
7.0.90.0040.01015.16
7.0.80.0020.00915.21
7.0.70.0020.01015.39
7.0.60.0080.02216.83
7.0.50.0050.03216.09
7.0.40.0110.03015.65
7.0.30.0130.02415.48
7.0.20.0170.03015.67
7.0.10.0060.03615.62
7.0.00.0090.03115.55
5.6.380.0050.00514.23
5.6.370.0050.00914.32
5.6.360.0090.00514.19
5.6.350.0080.00714.19
5.6.340.0030.00714.53
5.6.330.0050.00714.08
5.6.320.0080.00614.11
5.6.310.0040.00914.13
5.6.300.0040.01213.94
5.6.290.0040.00714.26
5.6.280.0070.02516.58
5.6.270.0100.00213.99
5.6.260.0100.00514.03
5.6.250.0080.00414.04
5.6.240.0040.00814.22
5.6.230.0040.00813.94
5.6.220.0060.00613.80
5.6.210.0020.03416.15
5.6.200.0060.02115.41
5.6.190.0040.02516.26
5.6.180.0120.02716.32
5.6.170.0120.02916.23
5.6.160.0040.03316.25
5.6.150.0100.01415.56
5.6.140.0040.02415.54
5.6.130.0080.01715.50
5.6.120.0080.02716.44
5.6.110.0050.03316.47
5.6.100.0080.03316.57
5.6.90.0100.01616.49
5.6.80.0070.02516.29
5.6.70.0050.00513.99
5.6.60.0030.01114.10
5.6.50.0050.00614.02
5.6.40.0030.00613.99
5.6.30.0060.00814.05
5.6.20.0050.00714.06
5.6.10.0030.01113.96
5.6.00.0080.00513.95
5.5.380.0000.00811.22
5.5.370.0030.00711.22
5.5.360.0040.00411.22
5.5.350.0060.03214.29
5.5.340.0040.03313.49
5.5.330.0030.03514.28
5.5.320.0120.02314.27
5.5.310.0100.02814.23
5.5.300.0030.02213.48
5.5.290.0040.03013.48
5.5.280.0070.01614.37
5.5.270.0030.02014.39
5.5.260.0020.03514.44
5.5.250.0050.02614.35
5.5.240.1210.01914.17
5.5.230.0050.00611.22
5.5.220.0030.00611.22
5.5.210.0100.00311.22
5.5.200.0030.00911.22
5.5.190.0020.00511.22
5.5.180.0040.00711.22
5.5.170.0050.00712.55
5.5.160.0030.00511.22
5.5.150.0070.00511.22
5.5.140.0090.00211.22
5.5.130.0060.00411.22
5.5.120.0030.00511.22
5.5.110.0000.01011.22
5.5.100.0070.00511.22
5.5.90.0020.00911.22
5.5.80.0050.00511.22
5.5.70.0050.00611.22
5.5.60.0020.00611.22
5.5.50.0050.00511.22
5.5.40.0080.00311.22
5.5.30.0030.00511.22
5.5.20.0020.00711.22
5.5.10.0030.00511.22
5.5.00.0060.00311.22

preferences:
50.3 ms | 401 KiB | 5 Q