Re: is_a() against instanceof

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eli schrieb:
> - ($cls instanceof ClassName)  *requires* from ClassName to be declared,
> and generates a fatal error when ClassName is not declared.
How about
if (class_exists('ClassName') AND $cls instanceof ClassName)
{
   ...
}

Regards,
  Christian Stadler
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCN5d09250Hcbf/3IRAjACAJ4nuKWyohEgv74Ycj/oXYn/7vWW7gCaAqm3
FV6CJd6Sz3+K4Ur4WlKRlcM=
=K8j5
-----END PGP SIGNATURE-----

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux