Posted in

method_exists () in php?

method_exists () in php?

<?php
classA
{
publice function foo()
}
echo “foo”;
}
publice function bar()
{
if(method_exists($this,’foo’))
}
else
{
echo “method does not”;
}
}
}
$obj=newA;
$obj->barb;
?>

Output

method exists

Leave a Reply

Your email address will not be published. Required fields are marked *