git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330984 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Yasuo Ohgaki 2013-07-20 03:21:38 +00:00
parent c6b0a258de
commit 84d43cf819

View file

@ -225,7 +225,7 @@
<![CDATA[
<?php
$a = 3 * 3 % 5; // (3 * 3) % 5 = 4
// ternary operator associativity differs form C/C++
// ternary operator associativity differs from C/C++
$a = true ? 0 : true ? 1 : 2; // (true ? 0 : true) ? 1 : 2 = 2
$a = 1;
@ -234,7 +234,7 @@ $a = $b += 3; // $a = ($b += 3) -> $a = 5, $b = 5
// mixing ++ and +
$a = 1;
echo ++$a + $a++; // same as ++$a; $a + $a; $a++; print 4
echo ++$a + $a++; // same as ++$a; $a + $a; $a++; prints 4
?>
]]>
</programlisting>