svn: /phpdoc/en/trunk/language/ references.xml
| From: | Peter Cowburn | Date: | Fri, 29 Jan 2010 08:57:43 +0000 |
| Subject: | svn: /phpdoc/en/trunk/language/ references.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-5951@lists.php.net to get a copy of this message | ||
salathe Fri, 29 Jan 2010 08:57:43 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=294184
Log:
Added function foo to make references examples standalone. Fixes #50872
Bug: http://bugs.php.net/50872 (Open) inaccurate example in
pass-by-reference docs
Changed paths:
U phpdoc/en/trunk/language/references.xml
Modified: phpdoc/en/trunk/language/references.xml
===================================================================
--- phpdoc/en/trunk/language/references.xml 2010-01-29 07:42:30 UTC (rev 294183)
+++ phpdoc/en/trunk/language/references.xml 2010-01-29 08:57:43 UTC (rev 294184)
@@ -290,6 +290,10 @@
<programlisting role="php">
<![CDATA[
<?php
+function foo(&$var)
+{
+ $var++;
+}
function &bar()
{
$a = 5;
@@ -314,6 +318,10 @@
<programlisting role="php">
<![CDATA[
<?php
+function foo(&$var)
+{
+ $var++;
+}
function bar() // Note the missing &
{
$a = 5;