Warning: Division by zero in /var/customers/webs/stc/benchmark/index.php on line 256 Test: fcall vs. call_user_func_array

PHP Benchmarks

Performance comparison of PHP code alternatives.

Test: fcall vs. call_user_func_array()

Run Again Test Menu

Result

Unfortunately, no history for this test is available.

Code

The first test, "fcall", was:

/*
function do_something($i)
{
	for ($i = 0; $i < 20; $i++)
		$GLOBALS['dummy'] + $i;
}
*/

do_something(74);

The second test, "call_user_func_array()", was:

/*
function do_something($i)
{
	for ($i = 0; $i < 20; $i++)
		$GLOBALS['dummy'] + $i;
}
*/

call_user_func_array('do_something', array(74));

Running: Linux (x86_64:1 GB) PHP (7.2.22-1+ubuntu16.04.1+deb.sury.org+1)