Home >Backend Development >PHP Tutorial >Use of PHP instanceof
<?php class Math{ static function squared($input){ echo $input*$input; } } $math = new Math(); if($math instanceof Math){ echo 'yes'; }instanceof checks whether an instance is derived from this class.
The above introduces the use of PHP instanceof, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.