[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: Re: [DOC-CVS] svn: /phpdoc/en/trunk/language/ operators.xml
From: Yasuo Ohgaki <yohgaki () ohgaki ! net>
Date: 2013-11-15 22:06:47
Message-ID: CAGa2bXZo6JvOn49d6h5dpK4H_-McHuVT4SqgxfoPU=wiuNLODA () mail ! gmail ! com
[Download RAW message or body]
Thank you. I'll fix this now.
--
Yasuo Ohgaki
yohgaki@ohgaki.net
On Fri, Nov 15, 2013 at 5:56 PM, Peter Cowburn <petercowburn@gmail.com>wrote:
>
>
>
> On 15 November 2013 04:05, Yasuo Ohgaki <yohgaki@php.net> wrote:
>
>> yohgaki Fri, 15 Nov 2013 04:05:46 +0000
>>
>> Revision: http://svn.php.net/viewvc?view=revision&revision=332116
>>
>> Log:
>> Improve comparison description. Add example
>>
>> Changed paths:
>> U phpdoc/en/trunk/language/operators.xml
>>
>> Modified: phpdoc/en/trunk/language/operators.xml
>> ===================================================================
>> --- phpdoc/en/trunk/language/operators.xml 2013-11-14 17:14:09 UTC
>> (rev 332115)
>> +++ phpdoc/en/trunk/language/operators.xml 2013-11-15 04:05:46 UTC
>> (rev 332116)
>> @@ -1262,7 +1262,7 @@
>> <row>
>> <entry><type>bool</type> or <type>null</type></entry>
>> <entry>anything</entry>
>> - <entry>Convert to <type>bool</type>, &false; < &true;</entry>
>> + <entry>Convert both sides to <type>bool</type>, &false; <
>> &true;</entry>
>> </row>
>> <row>
>> <entry><type>object</type></entry>
>> @@ -1298,8 +1298,28 @@
>> </tbody>
>> </tgroup>
>> </table>
>> +
>> <para>
>> <example>
>> + <title>Boolean/null comparison</title>
>> + <programlisting role="php">
>> +<![CDATA[
>> +<?php
>> +// Bool and null are compared as bool always
>> +var_dump(1 == TRUE); // TRUE - same as (bool)1 == TRUE
>> +var_dump(0 == FALSE); // TRUE - same as (bool)0 == FALSE
>> +var_dump(100 < TRUE); // FALSE - same as (bool)100 < TRUE
>> +var_dump(-10 < FALSE);// FALSE - same as (bool)-10 < FALSE
>> +var_dunp(min(-100,-10, NULL, 10, 100); // NULL - (bool)NULL < (bool)-100
>> is FALSE < TRUE
>>
>
> var_dunp?.. This same type occurs in your changes to the min() page.
>
> Also, the mixed use of the "-" character in the comment is unnecessarily
> confusing. It makes it look like the result value "NULL" is part of a
> bigger expression up to the word "is", and "NULL - (bool)NULL < (bool)-100"
> doesn't make sense given the example code.
>
>
>> +?>
>> +]]>
>> + </programlisting>
>> + </example>
>> + </para>
>> +
>> +
>> + <para>
>> + <example>
>> <title>Transcription of standard array comparison</title>
>> <programlisting role="php">
>> <![CDATA[
>>
>>
>> --
>> PHP Documentation Commits Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic