3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function foo($a, $b) {} } $object = new A; $t = microtime (true); for ($i=0; $i<100; $i++) { call_user_func_array(array($object, 'foo'), array(1, 'foo')); } echo 'call_user_func_array: '.round((microtime(true)-$t)*1000, 2)." ms\n"; $t = microtime (true); $ref = new ReflectionMethod($object, 'foo'); for ($i=0; $i<100; $i++) { $ref->invokeArgs($object, array(1, 'foo')); } echo 'ReflectionMethod::invokeArgs: '.round((microtime(true)-$t)*1000, 2)." ms\n";
Output for 7.2.0
call_user_func_array: 0.03 ms ReflectionMethod::invokeArgs: 0.02 ms
Output for 7.0.2, 7.1.7
call_user_func_array: 0.02 ms ReflectionMethod::invokeArgs: 0.02 ms
Output for 7.1.6
call_user_func_array: 0.04 ms ReflectionMethod::invokeArgs: 0.04 ms
Output for 7.1.5
call_user_func_array: 0.05 ms ReflectionMethod::invokeArgs: 0.04 ms
Output for 7.1.0
call_user_func_array: 0.03 ms ReflectionMethod::invokeArgs: 0.03 ms
Output for 7.0.20
call_user_func_array: 0.03 ms ReflectionMethod::invokeArgs: 0.04 ms
Output for 7.0.0, 7.0.4 - 7.0.14
call_user_func_array: 0.02 ms ReflectionMethod::invokeArgs: 0.03 ms
Output for 7.0.1, 7.0.3
call_user_func_array: 0.01 ms ReflectionMethod::invokeArgs: 0.02 ms
Output for 5.4.41, 5.6.16, 5.6.28
call_user_func_array: 0.1 ms ReflectionMethod::invokeArgs: 0.08 ms
Output for 5.4.40, 5.5.30, 5.6.7, 5.6.12, 5.6.21
call_user_func_array: 0.1 ms ReflectionMethod::invokeArgs: 0.07 ms
Output for 5.6.20
call_user_func_array: 0.12 ms ReflectionMethod::invokeArgs: 0.08 ms
Output for 5.6.17, 5.6.19
call_user_func_array: 0.06 ms ReflectionMethod::invokeArgs: 0.05 ms
Output for 5.5.25, 5.6.18
call_user_func_array: 0.06 ms ReflectionMethod::invokeArgs: 0.06 ms
Output for 5.6.13, 5.6.15
call_user_func_array: 0.1 ms ReflectionMethod::invokeArgs: 0.09 ms
Output for 5.4.45, 5.6.14
call_user_func_array: 0.08 ms ReflectionMethod::invokeArgs: 0.06 ms
Output for 5.6.11
call_user_func_array: 0.12 ms ReflectionMethod::invokeArgs: 0.1 ms
Output for 5.4.34, 5.4.39, 5.5.26, 5.5.28, 5.5.34, 5.6.10
call_user_func_array: 0.09 ms ReflectionMethod::invokeArgs: 0.07 ms
Output for 5.6.9
call_user_func_array: 0.06 ms ReflectionMethod::invokeArgs: 0.04 ms
Output for 5.5.24, 5.6.8
call_user_func_array: 0.09 ms ReflectionMethod::invokeArgs: 0.06 ms
Output for 5.5.35
call_user_func_array: 0.08 ms ReflectionMethod::invokeArgs: 0.07 ms
Output for 5.5.33
call_user_func_array: 0.11 ms ReflectionMethod::invokeArgs: 0.07 ms
Output for 5.5.32
call_user_func_array: 0.08 ms ReflectionMethod::invokeArgs: 0.08 ms
Output for 5.3.29, 5.4.25, 5.4.42, 5.4.44, 5.5.31
call_user_func_array: 0.07 ms ReflectionMethod::invokeArgs: 0.06 ms
Output for 5.5.29
call_user_func_array: 0.09 ms ReflectionMethod::invokeArgs: 0.08 ms
Output for 5.4.2, 5.4.15, 5.4.18, 5.4.20, 5.4.28, 5.4.32, 5.5.27
call_user_func_array: 0.07 ms ReflectionMethod::invokeArgs: 0.05 ms
Output for 5.4.9, 5.4.43
call_user_func_array: 0.09 ms ReflectionMethod::invokeArgs: 0.09 ms
Output for 5.4.38
call_user_func_array: 0.14 ms ReflectionMethod::invokeArgs: 0.08 ms
Output for 5.4.37
call_user_func_array: 0.1 ms ReflectionMethod::invokeArgs: 0.17 ms
Output for 5.4.36
call_user_func_array: 0.12 ms ReflectionMethod::invokeArgs: 0.12 ms
Output for 5.4.35
call_user_func_array: 0.17 ms ReflectionMethod::invokeArgs: 0.23 ms
Output for 5.4.31
call_user_func_array: 0.11 ms ReflectionMethod::invokeArgs: 0.05 ms
Output for 5.4.30
call_user_func_array: 0.12 ms ReflectionMethod::invokeArgs: 0.05 ms
Output for 5.4.29
call_user_func_array: 0.1 ms ReflectionMethod::invokeArgs: 0.12 ms
Output for 5.4.19, 5.4.23, 5.4.27
call_user_func_array: 0.11 ms ReflectionMethod::invokeArgs: 0.13 ms
Output for 5.4.26
call_user_func_array: 0.12 ms ReflectionMethod::invokeArgs: 0.06 ms
Output for 5.4.24
call_user_func_array: 0.11 ms ReflectionMethod::invokeArgs: 0.09 ms
Output for 5.3.27, 5.4.22
call_user_func_array: 0.07 ms ReflectionMethod::invokeArgs: 0.09 ms
Output for 5.4.21
call_user_func_array: 0.13 ms ReflectionMethod::invokeArgs: 0.06 ms
Output for 5.4.17
call_user_func_array: 0.07 ms ReflectionMethod::invokeArgs: 0.1 ms
Output for 5.4.16
call_user_func_array: 0.1 ms ReflectionMethod::invokeArgs: 0.1 ms
Output for 5.4.7, 5.4.14
call_user_func_array: 0.12 ms ReflectionMethod::invokeArgs: 0.13 ms
Output for 5.4.13
call_user_func_array: 0.21 ms ReflectionMethod::invokeArgs: 0.14 ms
Output for 5.4.12
call_user_func_array: 0.13 ms ReflectionMethod::invokeArgs: 0.12 ms
Output for 5.4.11
call_user_func_array: 0.08 ms ReflectionMethod::invokeArgs: 0.1 ms
Output for 5.3.4, 5.4.1, 5.4.10
call_user_func_array: 0.13 ms ReflectionMethod::invokeArgs: 0.13 ms
Output for 5.4.8
call_user_func_array: 0.13 ms ReflectionMethod::invokeArgs: 0.1 ms
Output for 5.3.26, 5.4.6
call_user_func_array: 0.07 ms ReflectionMethod::invokeArgs: 0.12 ms
Output for 5.4.5
call_user_func_array: 0.08 ms ReflectionMethod::invokeArgs: 0.05 ms
Output for 5.4.4
call_user_func_array: 0.12 ms ReflectionMethod::invokeArgs: 0.09 ms
Output for 5.1.3, 5.3.2, 5.3.11, 5.4.3
call_user_func_array: 0.14 ms ReflectionMethod::invokeArgs: 0.14 ms
Output for 5.1.6, 5.4.0
call_user_func_array: 0.15 ms ReflectionMethod::invokeArgs: 0.13 ms
Output for 5.3.28
call_user_func_array: 0.07 ms ReflectionMethod::invokeArgs: 0.13 ms
Output for 5.3.25
call_user_func_array: 0.09 ms ReflectionMethod::invokeArgs: 0.31 ms
Output for 5.3.14, 5.3.19, 5.3.24
call_user_func_array: 0.14 ms ReflectionMethod::invokeArgs: 0.11 ms
Output for 5.3.23
call_user_func_array: 0.14 ms ReflectionMethod::invokeArgs: 0.19 ms
Output for 5.3.22
call_user_func_array: 0.23 ms ReflectionMethod::invokeArgs: 0.12 ms
Output for 5.1.5, 5.3.21
call_user_func_array: 0.15 ms ReflectionMethod::invokeArgs: 0.22 ms
Output for 5.3.12, 5.3.20
call_user_func_array: 0.15 ms ReflectionMethod::invokeArgs: 0.14 ms
Output for 5.3.18
call_user_func_array: 0.14 ms ReflectionMethod::invokeArgs: 0.15 ms
Output for 5.3.17
call_user_func_array: 0.14 ms ReflectionMethod::invokeArgs: 0.17 ms
Output for 5.3.16
call_user_func_array: 0.16 ms ReflectionMethod::invokeArgs: 0.14 ms
Output for 5.3.15
call_user_func_array: 0.14 ms ReflectionMethod::invokeArgs: 0.1 ms
Output for 5.3.13
call_user_func_array: 0.15 ms ReflectionMethod::invokeArgs: 0.12 ms
Output for 5.3.10
call_user_func_array: 0.13 ms ReflectionMethod::invokeArgs: 0.17 ms
Output for 5.3.0, 5.3.3, 5.3.6, 5.3.9
call_user_func_array: 0.13 ms ReflectionMethod::invokeArgs: 0.14 ms
Output for 5.3.8
call_user_func_array: 0.13 ms ReflectionMethod::invokeArgs: 0.18 ms
Output for 5.3.7
call_user_func_array: 0.14 ms ReflectionMethod::invokeArgs: 0.2 ms
Output for 5.3.5
call_user_func_array: 0.13 ms ReflectionMethod::invokeArgs: 0.19 ms
Output for 5.3.1
call_user_func_array: 0.14 ms ReflectionMethod::invokeArgs: 0.18 ms
Output for 5.2.17
call_user_func_array: 0.16 ms ReflectionMethod::invokeArgs: 0.24 ms
Output for 5.2.16
call_user_func_array: 0.16 ms ReflectionMethod::invokeArgs: 0.17 ms
Output for 5.2.11, 5.2.13, 5.2.15
call_user_func_array: 0.17 ms ReflectionMethod::invokeArgs: 0.18 ms
Output for 5.2.14
call_user_func_array: 0.19 ms ReflectionMethod::invokeArgs: 0.14 ms
Output for 5.2.12
call_user_func_array: 0.09 ms ReflectionMethod::invokeArgs: 0.1 ms
Output for 5.2.10
call_user_func_array: 0.25 ms ReflectionMethod::invokeArgs: 0.22 ms
Output for 5.2.0, 5.2.3, 5.2.9
call_user_func_array: 0.17 ms ReflectionMethod::invokeArgs: 0.17 ms
Output for 5.2.4, 5.2.8
call_user_func_array: 0.19 ms ReflectionMethod::invokeArgs: 0.17 ms
Output for 5.2.7
call_user_func_array: 0.2 ms ReflectionMethod::invokeArgs: 0.17 ms
Output for 5.2.6
call_user_func_array: 0.28 ms ReflectionMethod::invokeArgs: 0.12 ms
Output for 5.2.5
call_user_func_array: 0.16 ms ReflectionMethod::invokeArgs: 0.16 ms
Output for 5.2.2
call_user_func_array: 0.19 ms ReflectionMethod::invokeArgs: 0.22 ms
Output for 5.2.1
call_user_func_array: 0.25 ms ReflectionMethod::invokeArgs: 0.17 ms
Output for 5.1.4
call_user_func_array: 0.16 ms ReflectionMethod::invokeArgs: 0.2 ms
Output for 5.1.2
call_user_func_array: 0.17 ms ReflectionMethod::invokeArgs: 0.13 ms
Output for 5.1.1
call_user_func_array: 0.15 ms ReflectionMethod::invokeArgs: 0.16 ms
Output for 5.1.0
call_user_func_array: 0.25 ms ReflectionMethod::invokeArgs: 0.13 ms
Output for 5.0.3, 5.0.5
call_user_func_array: 0.19 ms Fatal error: Call to undefined method ReflectionMethod::invokeArgs() in /in/anval on line 18
Process exited with code 255.
Output for 5.0.4
call_user_func_array: 0.2 ms Fatal error: Call to undefined method ReflectionMethod::invokeArgs() in /in/anval on line 18
Process exited with code 255.
Output for 5.0.2
call_user_func_array: 0.18 ms Fatal error: Call to undefined method ReflectionMethod::invokeArgs() in /in/anval on line 18
Process exited with code 255.
Output for 5.0.1
call_user_func_array: 0.22 ms Fatal error: Call to undefined method ReflectionMethod::invokeArgs() in /in/anval on line 18
Process exited with code 255.
Output for 5.0.0
call_user_func_array: 0.09 ms Fatal error: Call to undefined method ReflectionMethod::invokeArgs() in /in/anval on line 18
Process exited with code 255.
Output for 4.4.1, 4.4.9
call_user_func_array: 0.14 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16
Process exited with code 255.
Output for 4.4.6, 4.4.8
call_user_func_array: 0.18 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16
Process exited with code 255.
Output for 4.3.9 - 4.3.10, 4.4.7
call_user_func_array: 0.21 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16
Process exited with code 255.
Output for 4.3.5, 4.4.3, 4.4.5
call_user_func_array: 0.22 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16
Process exited with code 255.
Output for 4.4.4
call_user_func_array: 0.23 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16
Process exited with code 255.
Output for 4.3.3, 4.3.7, 4.4.2
call_user_func_array: 0.15 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16
Process exited with code 255.
Output for 4.3.2, 4.4.0
call_user_func_array: 0.13 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16
Process exited with code 255.
Output for 4.3.11
call_user_func_array: 0.12 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16
Process exited with code 255.
Output for 4.3.8
call_user_func_array: 0.17 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16
Process exited with code 255.
Output for 4.3.6
call_user_func_array: 0.24 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16
Process exited with code 255.
Output for 4.3.4
call_user_func_array: 0.26 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16
Process exited with code 255.
Output for 4.3.1
call_user_func_array: 0.15 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16
Output for 4.3.0
call_user_func_array: 0.1 ms Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/anval on line 16

preferences:
155.68 ms | 401 KiB | 175 Q