Doc #75844 [Asn->Csd]: An example generates a notice
| From: | salathe@php.net | Date: | Thu, 18 Jan 2018 19:25:51 +0000 |
| Subject: | Doc #75844 [Asn->Csd]: An example generates a notice | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15346@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75844&edit=1
ID: 75844
Updated by: salathe@php.net
Reported by: jordi at enginydigital dot cat
Summary: An example generates a notice
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: Any
PHP Version: 7.0.27
Assigned To: salathe
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Many thanks for suggesting your patch in the online documentation editor and for taking the trouble
to create this bug report.
Previous Comments:
------------------------------------------------------------------------
[2018-01-18 19:24:14] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=343850
Log: foo(new foobar()) raises a notice as of PHP 7.0.7 (doc bug #75844)
This is due to the fixing of #72038
------------------------------------------------------------------------
[2018-01-18 19:09:00] jordi at enginydigital dot cat
Description:
------------
---
From manual page: http://www.php.net/language.references.pass
---
The statement in the docs -- New statements, i.e. foo(new foobar()) generates a notice since 7.0.7.
Notice: Only variables should be passed by reference
https://3v4l.org/RVcA3
Test script:
---------------
<?php
function foo(&$bar) {
var_dump($bar);
}
class Bar {
}
foo(new Bar());
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75844&edit=1