Skip to content

Commit df6f5ca

Browse files
committed
Merge pull request #17
* pull-request/17: consistency in byRef assignments
2 parents 6e30711 + 75abe71 commit df6f5ca

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spec/php-spec-draft.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -990,8 +990,8 @@ It is also possible to use byRef assignment to make three or more VSlots
990990
point to the same VStore. Consider the following example:
991991

992992
```
993-
$b = &$a;
994-
$c = &$b;
993+
$b =& $a;
994+
$c =& $b;
995995
$a = 123;
996996
```
997997
<pre>
@@ -1144,7 +1144,7 @@ as follows:
11441144
- If `$source`’s VStore has a refcount that is greater than 1, the Engine
11451145
uses an implementation-defined algorithm to decide whether to copy the element
11461146
using value assignment (`$destination = $source`) or byRef
1147-
assignment (`$destination = &$source`).
1147+
assignment (`$destination =& $source`).
11481148

11491149
Note the member-copy assignment `=*` is **not** an operator or language
11501150
construct in the PHP language, but instead it is used internally to
@@ -5851,14 +5851,14 @@ expression having array type, see [§§](#deferred-array-copying).
58515851

58525852
```
58535853
$a = 10;
5854-
$b = &$a; // make $b an alias of $a
5854+
$b =& $a; // make $b an alias of $a
58555855
++$a; // increment $a/$b to 11
58565856
$b = -12; // sets $a/$b to -12
58575857
$a = "abc"; // sets $a/$b to "abc"
58585858
unset($b); // removes $b's alias to $a
58595859
// -----------------------------------------
58605860
function &g2() { $t = "xxx"; return $t; } // return byRef
5861-
$b = &g2(); // make $b an alias to "xxx"
5861+
$b =& g2(); // make $b an alias to "xxx"
58625862
```
58635863

58645864
##Compound Assignment

0 commit comments

Comments
 (0)