Most Referenced Functions
  » google_pagerank()
  » preg_replace()
  » imagecreatefrompng()
  » site_pageranks()
  » imagepng()
  » imagedestroy()
  » imagestring()
  » imagecolorallocate()
  » htmlentities()
  » fopen()
  » preg_match()
  » header()
  » getimagesize()
  » htmlspecialchars()
  » ob_start()
  » session_start()
  » strstr()
  » ob_flush()
  » preg_match_all()
  » strpos()
  » setcookie()
  » flush()
  » str_replace()
  » array2vars()
  » nl2br()
  » preg_split()
  » ereg()
  » urlencode()
  » ereg_replace()
  » readgzfile()

Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m.

PHP Functions

Function: class_parents

(PHP 5)

class_parents --  Return the parent classes of the given class

Description

array class_parents ( mixed class [, bool autoload] )

This function returns an array with the name of the parent classes of the given class .

Parameters

class

An object or a string of the class

Return Values

Returns an array or FALSE on error.

ChangeLog

Version Description 5.1.0 Added the option to pass the parameter as a string

Examples

Example 1. class_parents() example

<?php

class foo { }
class bar extends foo {}

print_r(class_parents(new bar));

?>

The above example will output:

Array
(
    [foo] => foo
)

Related Function(s)

  • class_implements()
  • Icemelon -- PHP, CSS, Javascript Tutorials, & More!
      © 2005-2010 Icemelon.com   Email: dave[AT]icemelon[D0T]c0m