PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
aliasxneo
Forum Contributor
Posts: 136 Joined: Thu Aug 31, 2006 12:01 am
Post
by aliasxneo » Sun May 04, 2008 10:34 pm
Is there any difference between these lines of code:
Code: Select all
$result = call_user_func($funcName);
Is there anything PHP does in the background with call_user_func() that is important and/or necessary?
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Sun May 04, 2008 10:42 pm
Significant changes in the background? No. The only real difference is how errors are handled.
aliasxneo
Forum Contributor
Posts: 136 Joined: Thu Aug 31, 2006 12:01 am
Post
by aliasxneo » Sun May 04, 2008 10:46 pm
Jcart wrote: Significant changes in the background? No. The only real difference is how errors are handled.
I see. So instead of the normal error reporting call_user_func will just return false?