Bug #9092 Updated: variables-by-references in class constructor not working
| From: | jmoore@php.net | Date: | Tue, 12 Jun 2001 16:41:22 +0000 |
| Subject: | Bug #9092 Updated: variables-by-references in class constructor not working | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56921@lists.php.net to get a copy of this message | ||
ID: 9092
Updated by: jmoore
Reported By: t.stinner@billiton.de
Old-Status: Duplicate
Status: Closed
Bug Type: Class/Object related
Operating system:
PHP Version: 4.0.4pl1
Assigned To:
Comments:
You cant pass a literal via reference. Closing report. This is in the todo for 4.1.
Previous Comments:
---------------------------------------------------------------------------
[2001-02-20 01:34:45] andre@php.net
covered by 6343
---------------------------------------------------------------------------
[2001-02-03 19:00:05] t.stinner@billiton.de
hmm, i see your point.
is it possible to define a value that should be
passwd by reference as optional?
---------------------------------------------------------------------------
[2001-02-03 18:09:28] zak@php.net
This should not work - how can you pass a literal value by reference?
However, you are right about the error message - it does seem to be incorrect.
---------------------------------------------------------------------------
[2001-02-03 17:53:52] t.stinner@billiton.de
This code snippet:
class test {
function test(&$test1=false) {
}
}
gives me
Parse error - parse error, expecting `')''
on the line with the constructor (function ...)
shouldn't this work (or at least return a useful error)?
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9092&edit=2