php how to check variable is callable code example
Example: check if a function is callable php
<?php
function test1(){
}
var_dump( is_callable("test1") );
var_dump( is_callable("test2") );
?>
// Output -
// bool(true) bool(false)
<?php
function test1(){
}
var_dump( is_callable("test1") );
var_dump( is_callable("test2") );
?>
// Output -
// bool(true) bool(false)