Skip to content

Instantly share code, notes, and snippets.

@hamidreza-s
Last active August 11, 2017 14:14
Show Gist options
  • Save hamidreza-s/4474226 to your computer and use it in GitHub Desktop.
Save hamidreza-s/4474226 to your computer and use it in GitHub Desktop.
<?php
// Class
$reflector = new ReflectionClass('FooClass');
// Class methods
/*
array(43) {
[0] => string(6) "export"
[1] => string(11) "__construct"
[2] => string(10) "__toString"
[3] => string(7) "getName"
[4] => string(10) "isInternal"
[5] => string(13) "isUserDefined"
[6] => string(14) "isInstantiable"
[7] => string(11) "getFileName"
[8] => string(12) "getStartLine"
[9] => string(10) "getEndLine"
[10] => string(13) "getDocComment"
[11] => string(14) "getConstructor"
[12] => string(9) "hasMethod"
[13] => string(9) "getMethod"
[14] => string(10) "getMethods"
[15] => string(11) "hasProperty"
[16] => string(11) "getProperty"
[17] => string(13) "getProperties"
[18] => string(11) "hasConstant"
[19] => string(12) "getConstants"
[20] => string(11) "getConstant"
[21] => string(13) "getInterfaces"
[22] => string(17) "getInterfaceNames"
[23] => string(11) "isInterface"
[24] => string(10) "isAbstract"
[25] => string(7) "isFinal"
[26] => string(12) "getModifiers"
[27] => string(10) "isInstance"
[28] => string(11) "newInstance"
[29] => string(15) "newInstanceArgs"
[30] => string(14) "getParentClass"
[31] => string(12) "isSubclassOf"
[32] => string(19) "getStaticProperties"
[33] => string(22) "getStaticPropertyValue"
[34] => string(22) "setStaticPropertyValue"
[35] => string(20) "getDefaultProperties"
[36] => string(13) "isIterateable"
[37] => string(19) "implementsInterface"
[38] => string(12) "getExtension"
[39] => string(16) "getExtensionName"
[40] => string(11) "inNamespace"
[41] => string(16) "getNamespaceName"
[42] => string(12) "getShortName"
}
*/
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment