check if a function is callable php

PHP
<?php
function test1(){
}
var_dump( is_callable("test1") );
var_dump( is_callable("test2") );
?>

// Output -
// bool(true) bool(false) 
Source

Also in PHP: