I am working on a project, in which i am using some deprecated function form the older version. But don't want my script to be stopped if used in the older version. So i am checking if the function exists and if it doesn't then creating it again.
Ama function_exists ve is_callable php ve hangisinin kullanıcıya iyidir arasındaki fark nedir?
if(!is_callable('xyz')) {
function xyz() {
// code goes here
}
}
VEYA
if(!function_exists('xyz')) {
function xyz() {
// code goes here
}
}