Created
August 11, 2016 20:00
-
-
Save jacobhenke/2c18159e6e2038914458bf5273507e35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$temp = function ($object) { //Test Object | |
if (!is_object($object)) { | |
throw new \Exception("This is not a Object"); | |
} | |
if (class_exists(get_class($object), true)) echo "<pre>CLASS NAME = " . get_class($object); | |
$reflection = new \ReflectionClass(get_class($object)); | |
echo "<br />"; | |
echo $reflection->getDocComment(); | |
echo "<br />"; | |
$metody = $reflection->getMethods(); | |
foreach ($metody as $key => $value) { | |
echo "<br />" . $value; | |
} | |
echo "<br />"; | |
$vars = $reflection->getProperties(); | |
foreach ($vars as $key => $value) { | |
echo "<br />" . $value; | |
} | |
echo "</pre>"; | |
}; | |
echo $temp($OBJECT_TO_TEST); die(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gets information about all the methods on an instantiated object.