what is a quick way to filter a string to work as a function name?
note: I’m thinking something like filter_var().
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You might be looking for
is_callable— Verify that the contents of a variable can be called as a functionIf you just want to make sure the supplied value is valid syntax for a function name, you can set the second argument
$syntax_onlytoTRUE: