ckrudelux Posted September 28, 2011 Share Posted September 28, 2011 I'm looking for a way to check if the function was defined by the user. I can't find anything from google, I wrote this but this loads all functions separated in two list I only need one of them. Is where a function for this or do I need to do it this way? <?php function is_function_user_defined($func){ $functions = get_defined_functions(); if(in_array($func, $functions['user'])){ return true; }else{ return false; } }?> Link to comment Share on other sites More sharing options...
justsomeguy Posted September 29, 2011 Share Posted September 29, 2011 That's the way to check for defined functions. You have some extra parentheses in there though. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.