PHP/Reflection/interface exists
_exists function
<source lang="html4strict">
bool function_exists (string function_name) bool method_exists (object object, string method_name) bool class_exists (string class_name [, bool autoload]) bool interface_exists (string interface_name [, bool autoload]) <?php
if (function_exists($isemail)){ if (isemail($email)){ } else { echo "Not a valid e-mail address."; } } else { echo "Function does not exist.
"; } if (class_exists (myparent)){ class anyclass extends myparent { public $somemember; public function dosomething (){ if (method_exists (parent,"parentmethod")){ } else { } } } } else { echo "Class does not exist.
"; } if (isset ($_POST["searchterm"])){ } else { echo "You must submit a search term. Please press the Back button."; }
?>
</source>