obtain by using class_parents(), class_implements(), get_class_methods(), and get_class_variables() in order to obtain information about the built-in ArrayIterator class: : class_parents « Reflection « PHP






obtain by using class_parents(), class_implements(), get_class_methods(), and get_class_variables() in order to obtain information about the built-in ArrayIterator class:

 
<?
$class = 'ArrayIterator'; 
eval("@\$object = new \$class();"); 

printf("<p>%s class parents: %s</p>\n", $class, print_r(class_parents($object), TRUE)); 
printf("<p>%s class implements: %s</p>\n", $class, implode(', ', class_implements($object))); 
printf("<p>%s class methods: %s</p>\n", $class, implode(', ', get_class_methods($class))); 
?>
  
  








Related examples in the same category