3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function bar() { $args = func_get_args(); var_dump($args); } } $method = array('Foo', 'bar'); $args = 123; call_user_func($method, $args); // NOT WORKING it just don't goes in the methods call call_user_func($method, 123); // NOT WORKING it just don't goes in the methods call call_user_func($method, (int) 123); // WORKING !! $method = array('Foo', 'bar'); $args = array(123, 456); call_user_func_array($method, $args); // NOT WORKING call_user_func_array($method, (array) $args); // NOT WORKING it just don't goes in the methods call call_user_func_array($method, array((array) $args)); // WORKING !!

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.50
8.3.50.0120.00722.04
8.3.40.0110.00418.70
8.3.30.0110.00318.95
8.3.20.0000.00720.18
8.3.10.0080.00023.56
8.3.00.0070.00417.50
8.2.180.0100.01018.28
8.2.170.0140.00722.96
8.2.160.0100.00320.47
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0000.01526.16
8.2.120.0040.00419.48
8.2.110.0090.00022.31
8.2.100.0040.00817.84
8.2.90.0040.00419.35
8.2.80.0040.00417.97
8.2.70.0040.00817.75
8.2.60.0040.00417.91
8.2.50.0030.00718.07
8.2.40.0040.00418.02
8.2.30.0000.00717.95
8.2.20.0030.00517.88
8.2.10.0040.00418.18
8.2.00.0030.00717.80
8.1.280.0110.00425.92
8.1.270.0040.01423.99
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00423.98
8.1.230.0110.00019.20
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0060.00317.36
8.1.190.0040.00417.53
8.1.180.0000.00818.10
8.1.170.0090.00018.53
8.1.160.0000.00721.92
8.1.150.0040.00418.54
8.1.140.0000.00717.51
8.1.130.0070.00017.75
8.1.120.0040.00417.37
8.1.110.0000.00717.36
8.1.100.0000.00717.44
8.1.90.0040.00417.50
8.1.80.0030.00617.34
8.1.70.0070.00017.36
8.1.60.0000.00917.58
8.1.50.0030.00517.36
8.1.40.0090.00017.53
8.1.30.0060.00317.49
8.1.20.0000.00817.61
8.1.10.0060.00317.60
8.1.00.0040.00417.45
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0030.00318.44
8.0.270.0080.00017.17
8.0.260.0000.00717.38
8.0.250.0000.00716.92
8.0.240.0000.00716.90
8.0.230.0000.00717.02
8.0.220.0040.00416.97
8.0.210.0040.00416.98
8.0.200.0050.00316.88
8.0.190.0040.00416.90
8.0.180.0040.00416.88
8.0.170.0080.00017.00
8.0.160.0030.00616.83
8.0.150.0040.00416.93
8.0.140.0000.00716.88
8.0.130.0030.00313.34
8.0.120.0050.00316.97
8.0.110.0020.00516.94
8.0.100.0030.00617.00
8.0.90.0030.00516.87
8.0.80.0060.00916.90
8.0.70.0040.00417.02
8.0.60.0000.00816.80
8.0.50.0030.00516.94
8.0.30.0120.00617.18
8.0.20.0150.00417.40
8.0.10.0040.00417.03
8.0.00.0120.00516.84
7.4.330.0050.00315.00
7.4.320.0030.00316.66
7.4.300.0030.00316.64
7.4.290.0030.00316.41
7.4.280.0070.00016.55
7.4.270.0030.00316.50
7.4.260.0000.00816.44
7.4.250.0050.00316.32
7.4.240.0030.00316.47
7.4.230.0000.00716.70
7.4.220.0120.00616.62
7.4.210.0140.00316.58
7.4.200.0030.00316.64
7.4.190.0070.00016.66
7.4.160.0110.00616.55
7.4.150.0120.00617.40
7.4.140.0190.01517.86
7.4.130.0080.00916.48
7.4.120.0100.00816.46
7.4.110.0070.01116.51
7.4.100.0110.00716.62
7.4.90.0110.00716.61
7.4.80.0070.01519.39
7.4.70.0070.01016.58
7.4.60.0070.01316.40
7.4.50.0030.00316.64
7.4.40.0040.01522.77
7.4.30.0090.00616.47
7.4.00.0120.00414.80
7.3.330.0050.00013.33
7.3.320.0080.00013.12
7.3.310.0030.00416.25
7.3.300.0000.00716.36
7.3.290.0060.00916.37
7.3.280.0080.01016.34
7.3.270.0090.00917.40
7.3.260.0070.01316.31
7.3.250.0100.00816.41
7.3.240.0100.01016.37
7.3.230.0090.00916.55
7.3.210.0060.01616.31
7.3.200.0090.00919.39
7.3.190.0100.01316.31
7.3.180.0060.01016.45
7.3.170.0070.01016.35
7.3.160.0130.00716.43
7.3.120.0040.01314.67
7.3.110.0060.01214.62
7.3.100.0030.01014.80
7.3.90.0090.00614.96
7.3.80.0090.00614.86
7.3.70.0020.01414.79
7.3.60.0030.01014.89
7.3.50.0070.00414.61
7.3.40.0150.00014.80
7.3.30.0080.00614.90
7.3.20.0030.01216.41
7.3.10.0060.00616.56
7.3.00.0070.00616.57
7.2.330.0090.00916.32
7.2.320.0070.01116.70
7.2.310.0110.00616.73
7.2.300.0110.00616.52
7.2.290.0090.00916.52
7.2.250.0060.00915.20
7.2.240.0090.00615.21
7.2.230.0070.01015.06
7.2.220.0000.01115.07
7.2.210.0120.00615.16
7.2.200.0070.01015.05
7.2.190.0100.00615.13
7.2.180.0040.01114.64
7.2.170.0030.01415.06
7.2.130.0070.00816.82
7.2.120.0050.00716.65
7.2.110.0110.00316.76
7.2.100.0050.00916.80
7.2.90.0070.00816.88
7.2.80.0060.00516.79
7.2.70.0060.01016.69
7.2.60.0060.00716.90
7.2.50.0070.01116.89
7.2.40.0040.01016.84
7.2.30.0110.00916.61
7.2.20.0100.00816.73
7.2.10.0100.00516.88
7.2.00.0090.00616.85
7.1.330.0090.00615.79
7.1.320.0090.00415.85
7.1.310.0100.00715.48
7.1.300.0030.00915.82
7.1.290.0060.00315.80
7.1.280.0070.01115.49
7.1.270.0080.00815.91
7.1.260.0070.00715.63
7.1.250.0050.00515.69
7.1.100.0000.01018.20
7.1.70.0070.00017.32
7.1.60.0060.01819.33
7.1.50.0090.01217.07
7.1.00.0100.07022.47
7.0.200.0000.01216.82
7.0.140.0000.07322.06
7.0.100.0100.06019.95
7.0.90.0000.07320.14
7.0.80.0030.06720.12
7.0.70.0100.05720.15
7.0.60.0130.04019.86
7.0.50.0100.07320.34
7.0.40.0170.07320.12
7.0.30.0100.08020.17
7.0.20.0070.08720.08
7.0.10.0100.07720.10
7.0.00.0070.08320.07
5.6.280.0030.07320.78
5.6.250.0100.07020.75
5.6.240.0000.06020.67
5.6.230.0130.07020.75
5.6.220.0170.07020.64
5.6.210.0170.05320.58
5.6.200.0070.08021.03
5.6.190.0100.04721.04
5.6.180.0030.04321.11
5.6.170.0130.07721.06
5.6.160.0070.07021.08
5.6.150.0130.06721.10
5.6.140.0130.07720.95
5.6.130.0030.05321.14
5.6.120.0100.08321.00
5.6.110.0070.05020.94
5.6.100.0070.07721.01
5.6.90.0130.07321.09
5.6.80.0100.08020.52
5.6.70.0100.04320.46
5.6.60.0030.08320.38
5.6.50.0130.07020.46
5.6.40.0030.08320.39
5.6.30.0200.03720.45
5.6.20.0100.06720.48
5.6.10.0000.09020.34
5.6.00.0130.04020.30
5.5.380.0070.05020.54
5.5.370.0070.08020.39
5.5.360.0000.07020.35
5.5.350.0130.07320.34
5.5.340.0030.09320.78
5.5.330.0030.08720.92
5.5.320.0030.08320.84
5.5.310.0130.07320.74
5.5.300.0130.06320.82
5.5.290.0030.09020.61
5.5.280.0100.08020.93
5.5.270.0070.05020.83
5.5.260.0030.09020.90
5.5.250.0130.07720.70
5.5.240.0030.07720.22
5.5.230.0100.07020.21
5.5.220.0030.05020.26
5.5.210.0030.08320.29
5.5.200.0100.08020.00
5.5.190.0070.07020.25
5.5.180.0070.07720.18
5.5.160.0070.08020.24
5.5.150.0070.06720.26
5.5.140.0030.08319.98
5.5.130.0200.03320.22
5.5.120.0100.07720.25
5.5.110.0070.05720.18
5.5.100.0030.04020.06
5.5.90.0100.04020.06
5.5.80.0130.07020.09
5.5.70.0000.08320.11
5.5.60.0070.06720.05
5.5.50.0130.08720.06
5.5.40.0030.08320.08
5.5.30.0070.08319.99
5.5.20.0070.07320.05
5.5.10.0070.04320.00
5.5.00.0100.08020.05
5.4.450.0030.07719.56
5.4.440.0070.05019.46
5.4.430.0100.07719.50
5.4.420.0070.08319.27
5.4.410.0230.06019.32
5.4.400.0070.07718.95
5.4.390.0070.07319.09
5.4.380.0000.08318.82
5.4.370.0130.04019.04
5.4.360.0030.08019.09
5.4.350.0200.06019.25
5.4.340.0030.07019.16
5.4.320.0170.06319.13
5.4.310.0030.05019.03
5.4.300.0070.06018.96
5.4.290.0070.06719.13
5.4.280.0100.07319.05
5.4.270.0100.06719.18
5.4.260.0100.07019.20
5.4.250.0070.04719.09
5.4.240.0030.04019.02
5.4.230.0170.05719.22
5.4.220.0100.07019.02
5.4.210.0070.04718.87
5.4.200.0100.03719.02
5.4.190.0030.07718.93
5.4.180.0000.05719.04
5.4.170.0130.06719.02
5.4.160.0130.07019.03
5.4.150.0030.08318.85
5.4.140.0030.07016.41
5.4.130.0170.06316.44
5.4.120.0170.03716.26
5.4.110.0100.07016.46
5.4.100.0100.07016.46
5.4.90.0070.07316.47
5.4.80.0100.07016.38
5.4.70.0130.06316.26
5.4.60.0070.06016.45
5.4.50.0030.04716.32
5.4.40.0070.06316.46
5.4.30.0070.04716.40
5.4.20.0030.07716.39
5.4.10.0030.04716.36
5.4.00.0100.06715.90
5.3.290.0070.08314.73
5.3.280.0000.08014.52
5.3.270.0070.08014.55
5.3.260.0100.07714.63
5.3.250.0130.06714.55
5.3.240.0070.05714.74
5.3.230.0170.07314.60
5.3.220.0100.06714.49
5.3.210.0100.07314.54
5.3.200.0070.07014.68
5.3.190.0000.04314.62
5.3.180.0030.04014.57
5.3.170.0130.04014.48
5.3.160.0030.04014.48
5.3.150.0070.07314.51
5.3.140.0000.07714.57
5.3.130.0000.06714.65
5.3.120.0130.07314.46
5.3.110.0070.07714.54
5.3.100.0100.07314.07
5.3.90.0170.06314.07
5.3.80.0030.07014.07
5.3.70.0100.07014.07
5.3.60.0070.07014.07
5.3.50.0030.07314.07
5.3.40.0070.07314.07
5.3.30.0130.03714.07
5.3.20.0030.06714.07
5.3.10.0070.06314.07
5.3.00.0170.05714.07
5.2.170.0030.06314.07
5.2.160.0030.04014.07
5.2.150.0070.05714.07
5.2.140.0000.06714.07
5.2.130.0070.05714.07
5.2.120.0070.06014.07
5.2.110.0030.05714.07
5.2.100.0130.05314.07
5.2.90.0070.05314.07
5.2.80.0030.06714.07
5.2.70.0030.06314.07
5.2.60.0030.06014.07
5.2.50.0070.03314.07
5.2.40.0000.05014.07
5.2.30.0030.06314.07
5.2.20.0030.03714.07
5.2.10.0170.04014.07
5.2.00.0000.03014.07
5.1.60.0000.05014.07
5.1.50.0070.05014.07
5.1.40.0030.05314.07
5.1.30.0070.05314.07
5.1.20.0070.04714.07
5.1.10.0100.05314.07
5.1.00.0100.04014.07
5.0.50.0100.03714.07
5.0.40.0030.04314.07
5.0.30.0100.06714.07
5.0.20.0030.04314.07
5.0.10.0000.04714.07
5.0.00.0070.06714.07
4.4.90.0000.03714.07
4.4.80.0030.03314.07
4.4.70.0000.02014.07
4.4.60.0000.03714.07
4.4.50.0030.03014.07
4.4.40.0000.05314.07
4.4.30.0000.02714.07
4.4.20.0070.03314.07
4.4.10.0030.02014.07
4.4.00.0000.05714.07
4.3.110.0070.03014.07
4.3.100.0030.03014.07
4.3.90.0000.03314.07
4.3.80.0030.05314.07
4.3.70.0070.03014.07
4.3.60.0000.03714.07
4.3.50.0100.02314.07
4.3.40.0030.02714.07
4.3.30.0030.03314.07
4.3.20.0000.02314.07
4.3.10.0030.02314.07
4.3.00.0000.03714.07

preferences:
41.48 ms | 401 KiB | 5 Q