What exactly is the difference between the is_callable and function_exists in PHP?
<p>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.</p>

<p>But what is the difference between <code>function_exists</code> and <code>is_callable</code> in php and which one is better to user ?</p>

<pre><code>if(!is_callable('xyz')) {

  function xyz() {
    // code goes here
  }
}
</code></pre>

<p>OR</p>

<pre><code>if(!function_exists('xyz')) {

  function xyz() {
    // code goes here
  }
}
</code></pre>
