PHP_Compat
[ class tree: PHP_Compat ] [ index: PHP_Compat ] [ all elements ]

Source for file is_a.php

Documentation is available at is_a.php

  1. <?php
  2. // +----------------------------------------------------------------------+
  3. // | PHP Version 4                                                        |
  4. // +----------------------------------------------------------------------+
  5. // | Copyright (c) 1997-2004 The PHP Group                                |
  6. // +----------------------------------------------------------------------+
  7. // | This source file is subject to version 3 of the PHP license,         |
  8. // | that is bundled with this package in the file LICENSE, and is        |
  9. // | available at through the world-wide-web at                           |
  10. // | http://au.php.net/license/3_0.txt.                                   |
  11. // | If you did not receive a copy of the PHP license and are unable to   |
  12. // | obtain it through the world-wide-web, please send a note to          |
  13. // | license@php.net so we can mail you a copy immediately.               |
  14. // +----------------------------------------------------------------------+
  15. // | Author: Aidan Lister <aidan@php.net>                                 |
  16. // +----------------------------------------------------------------------+
  17. //
  18. // $Id: is_a.php,v 1.7 2004/05/20 13:37:41 aidan Exp $
  19. //
  20.  
  21.  
  22. /**
  23.  * Replace is_a()
  24.  *
  25.  * PHP 5
  26.  *
  27.  * http://php.net/function.is_a
  28.  *
  29.  * @author        Aidan Lister <aidan@php.net>
  30.  * @version       1.0
  31.  */
  32. if (!function_exists('is_a'))
  33. {
  34.     function is_a ($object$class)
  35.     {
  36.         if (get_class($object== strtolower($class)) {
  37.             return true;
  38.         }
  39.  
  40.         else {
  41.             return is_subclass_of($object$class);
  42.         }
  43.     }
  44. }
  45.  
  46. ?>

Documentation generated on Mon, 11 Mar 2019 10:16:56 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.