mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
d5f8dfbf70
commit
48b81962f4
1 changed files with 11 additions and 4 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue