cvs: phpdoc /en/language references.xml
| From: | Sebastian Bergmann | Date: | Wed, 20 Dec 2000 07:19:44 +0000 |
| Subject: | cvs: phpdoc /en/language references.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969333333@lists.php.net to get a copy of this message | ||
sbergmann Tue Dec 19 23:19:44 2000 EDT
Modified files:
/phpdoc/en/language references.xml
Log:
Cleaned up the language in references.xml a little.
Index: phpdoc/en/language/references.xml
diff -u phpdoc/en/language/references.xml:1.7 phpdoc/en/language/references.xml:1.8
--- phpdoc/en/language/references.xml:1.7 Sun Dec 10 01:46:15 2000
+++ phpdoc/en/language/references.xml Tue Dec 19 23:19:44 2000
@@ -4,11 +4,11 @@
<sect1 id="language.references.whatare">
<title>What References Are</title>
<simpara>
- References in PHP are means to call same variable content with
- different names. They are not like C pointers, they are symbol
- table aliases. Note that in PHP, variable names and variable
- content are different, so same content can have different
- names. The most close analogy is Unix filenames and files -
+ References are a means in PHP to access the same variable content
+ by different names. They are not like C pointers, they are symbol
+ table aliases. Note that in PHP, variable name and variable content
+ are different, so the same content can have different names.
+ The most close analogy is with Unix filenames and files -
variable names are directory entries, while variable contents is
the file itself. References can be thought of as hardlinking in
Unix filesystem.
@@ -59,8 +59,8 @@
</note>
<para>
The second thing references do is to pass variables
- by-reference. This is done by making local function variable and
- caller variable to be reference to the same content. Example:
+ by-reference. This is done by making a local variable in a function and
+ a variable in the calling scope reference to the same content. Example:
<informalexample>
<programlisting role="php">
function foo (&$var) {
@@ -86,7 +86,7 @@
<sect1 id="language.references.arent">
<title>What References Are Not</title>
<para>
- As said above, references aren't pointers. That means, the
+ As said before, references aren't pointers. That means, the
following construct won't do what you expect:
<informalexample>
<programlisting role="php">
@@ -98,11 +98,11 @@
</informalexample>
</para>
<simpara>
- What will happen that <varname>$var</varname> in foo will be bound
+ What happens is that <varname>$var</varname> in foo will be bound
with <varname>$bar</varname> in caller, but then it will be
re-bound with <varname>$GLOBALS["baz"]</varname>. There's no way
- to bind <varname>$bar</varname> in the caller to something else
- using reference mechanism, since <varname>$bar</varname> is not
+ to bind <varname>$bar</varname> in the calling scope to something else
+ using the reference mechanism, since <varname>$bar</varname> is not
available in the function foo (it is represented by
<varname>$var</varname>, but <varname>$var</varname> has only
variable contents and not name-to-value binding in the calling