Mention the deprecated is_a() within the instanceof docs. Deals with bug #27503

See also get_class().


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@159566 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Philip Olson 2004-05-24 23:32:50 +00:00
parent d5f8dfbf70
commit 48b81962f4

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.66 $ -->
<!-- $Revision: 1.67 $ -->
<chapter id="language.operators">
<title>Operators</title>
<simpara>
@ -882,7 +882,10 @@ var_dump($a === $b); // bool(false)
object is of a specified <link linkend="language.oop">object class</link>.
</para>
<simpara>
<literal>instanceof</literal> was introduced in PHP 5.
The <literal>instanceof</literal> operator was introduced in PHP 5.
Before this time <function>is_a</function> was used but
<function>is_a</function> has since been deprecated in favor of
<literal>instanceof</literal>.
</simpara>
<informalexample>
<programlisting>
@ -903,11 +906,15 @@ if ($thing instanceof B) {
]]>
</programlisting>
<simpara>
As <literal>$thing</literal> is an object of type A, but not B, only the block
dependent on the A type will be executed:
As <literal>$thing</literal> is an <type>object</type> of type A, but
not B, only the block dependent on the A type will be executed:
</simpara>
<screen>A</screen>
</informalexample>
<para>
See also <function>get_class</function> and
<function>is_a</function>.
</para>
</sect1>
</chapter>