note 72713 added to function.function-exists

From: Date: Tue, 30 Jan 2007 19:02:40 +0000
Subject: note 72713 added to function.function-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-122371@lists.php.net to get a copy of this message
to bob at thethirdshift dot net regarding is_callable vs function_exists. using your code is_callable = TRUE, function_exists = FALSE Did 10000 is_callables in 0.0443360805511 seconds Did 10000 function_exists in 0.0111110210419 seconds then we replace is_callable(array('test','test')); with $callarray = array('test','test'); // place this outside for-loop is_callable($callarray); is_callable = TRUE, function_exists = FALSE Did 10000 is_callables in 0.0314660072327 seconds Did 10000 function_exists in 0.0120670795441 seconds then we replace is_callable(array('test','test')); with is_callable('test','test'); is_callable = TRUE, function_exists = FALSE Did 10000 is_callables in 0.00991606712341 seconds Did 10000 function_exists in 0.0113790035248 seconds I hope you can see that loop-testing functions is not so simple. :) ---- Server IP: 64.71.164.2 Probable Submitter: 209.10.89.3 ---- Manual Page -- http://www.php.net/manual/en/function.function-exists.php Edit -- https://master.php.net/note/edit/72713 Del: integrated -- https://master.php.net/note/delete/72713/integrated Del: useless -- https://master.php.net/note/delete/72713/useless Del: bad code -- https://master.php.net/note/delete/72713/bad+code Del: spam -- https://master.php.net/note/delete/72713/spam Del: non-english -- https://master.php.net/note/delete/72713/non-english Del: in docs -- https://master.php.net/note/delete/72713/in+docs Del: other reasons-- https://master.php.net/note/delete/72713 Reject -- https://master.php.net/note/reject/72713 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#122371) next »