How do I determine if a function is defined in php? I'd like to do something like:
if(! function_defined(money_format)) // function not defined on windows
{
function money_format($str) { ... }
}
Is this possible in php?
How do I determine if a function is defined in php? I'd like to do something like:
if(! function_defined(money_format)) // function not defined on windows
{
function money_format($str) { ... }
}
Is this possible in php?
You can use the function_exists
function to determine if a function has been defined.
It's worth mentioning that you need to use method_exists to see if an object has a particular method defined.