Skip to content

Commit b10565c

Browse files
author
Yoshinari Takaoka
committed
add tables for assignment operators
git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@350381 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent 313557d commit b10565c

File tree

1 file changed

+121
-2
lines changed

1 file changed

+121
-2
lines changed

language/operators.xml

Lines changed: 121 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 0241f6e074be177780a87f25bccd36e32018c503 Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: fe3066e83f12e3016dd08ad78db536153f948db8 Maintainer: takagi Status: ready -->
44
<!-- CREDITS: hirokawa,mumumu -->
55
<chapter xml:id="language.operators" xmlns="http://docbook.org/ns/docbook">
66
<title>演算子</title>
@@ -492,7 +492,7 @@ $a = ($b = 4) + 5; // $a は 9 に等しくなり、$b には 4 が代入され
492492
</para>
493493
<para>
494494
基本代入演算子に加えて、全ての<link linkend="language.operators">
495-
バイナリ演算子</link>、配列結合および文字列演算子に関して
495+
演算子</link>、配列結合および文字列演算子に関して
496496
「複合演算子」があります。
497497
これにより、式の中の値を使用し、その値をその式の結果とすることができます。
498498
例えば、
@@ -600,6 +600,125 @@ Strict Standards: Assigning the return value of new by reference is deprecated i
600600
をご覧ください。
601601
</para>
602602
</sect2>
603+
604+
<sect2 xml:id="language.operators.assignment.arithmetic">
605+
<title>算術代入演算子</title>
606+
<informaltable>
607+
<tgroup cols="3">
608+
<thead>
609+
<row>
610+
<entry>例</entry>
611+
<entry>同一の結果になる操作</entry>
612+
<entry>演算</entry>
613+
</row>
614+
</thead>
615+
<tbody>
616+
<row>
617+
<entry>$a += $b</entry>
618+
<entry>$a = $a + b</entry>
619+
<entry>加算</entry>
620+
</row>
621+
<row>
622+
<entry>$a -= $b</entry>
623+
<entry>$a = $a - $b</entry>
624+
<entry>減算</entry>
625+
</row>
626+
<row>
627+
<entry>$a *= $b</entry>
628+
<entry>$a = $a * $b</entry>
629+
<entry>乗算</entry>
630+
</row>
631+
<row>
632+
<entry>$a /= $b</entry>
633+
<entry>$a = $a / $b</entry>
634+
<entry>除算</entry>
635+
</row>
636+
<row>
637+
<entry>$a %= $b</entry>
638+
<entry>$a = $a % $b</entry>
639+
<entry>剰余</entry>
640+
</row>
641+
</tbody>
642+
</tgroup>
643+
</informaltable>
644+
</sect2>
645+
646+
<sect2 xml:id="language.operators.assignment.bitwise">
647+
<title>ビット代入演算子</title>
648+
<informaltable>
649+
<tgroup cols="3">
650+
<thead>
651+
<row>
652+
<entry>例</entry>
653+
<entry>同一の結果になる操作</entry>
654+
<entry>演算</entry>
655+
</row>
656+
</thead>
657+
<tbody>
658+
<row>
659+
<entry>$a &amp;= $b</entry>
660+
<entry>$a = $a &amp; $b</entry>
661+
<entry>ビット積</entry>
662+
</row>
663+
<row>
664+
<entry>$a |= $b</entry>
665+
<entry>$a = $a | $b</entry>
666+
<entry>ビット和</entry>
667+
</row>
668+
<row>
669+
<entry>$a ^= $b</entry>
670+
<entry>$a = $a ^ $b</entry>
671+
<entry>排他的論理和</entry>
672+
</row>
673+
<row>
674+
<entry>$a &lt;&lt;= $b</entry>
675+
<entry>$a = $a &lt;&lt; $b</entry>
676+
<entry>左シフト</entry>
677+
</row>
678+
<row>
679+
<entry>$a &gt;&gt;= $b</entry>
680+
<entry>$a = $a &gt;&gt; $b</entry>
681+
<entry>右シフト</entry>
682+
</row>
683+
</tbody>
684+
</tgroup>
685+
</informaltable>
686+
</sect2>
687+
688+
<sect2 xml:id="language.operators.assignment.other">
689+
<title>その他の代入演算子</title>
690+
<informaltable>
691+
<tgroup cols="3">
692+
<thead>
693+
<row>
694+
<entry>例</entry>
695+
<entry>同一の結果になる操作</entry>
696+
<entry>演算</entry>
697+
</row>
698+
</thead>
699+
<tbody>
700+
<row>
701+
<entry>$a .= $b</entry>
702+
<entry>$a = $a . $b</entry>
703+
<entry>文字列の結合</entry>
704+
</row>
705+
<row>
706+
<entry>$a ??= $b</entry>
707+
<entry>$a = $a ?? $b</entry>
708+
<entry>Null合体</entry>
709+
</row>
710+
</tbody>
711+
</tgroup>
712+
</informaltable>
713+
</sect2>
714+
<sect2 xml:id="language.operators.assignment.see-also">
715+
<para>
716+
<link linkend="language.operators.arithmetic">
717+
代数演算子</link>, <link linkend="language.operators.bitwise">ビット演算子</link>,
718+
<link linkend="language.operators.string">文字列演算子</link>,
719+
<link linkend="language.operators.comparison.coalesce">NULL 合体演算子</link> のページも参照して下さい。
720+
</para>
721+
</sect2>
603722
</sect1>
604723

605724
<sect1 xml:id="language.operators.bitwise">

0 commit comments

Comments
 (0)