ID: 12809
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Suspended
Bug Type: Feature/Change Request
Operating System: linux 2.2
PHP Version: 4.0.4pl1
New Comment:

Default referenced variabeles are not yet supported.
They probably will be in the second release of the Zend engine. Suspending for now.

Derick

Previous Comments:
------------------------------------------------------------------------

[2001-08-17 09:17:50] [EMAIL PROTECTED]

In a class I often use functions like this to get/set variables:
class example {
  var $somevar;
function Somevar($arg = NULL) {
  if (!is_null($arg))
    $this->somevar = $arg;
return $this->somevar;
}
}

Everything is ok, but sometimes I would like to be able to do the same
with references, like so:
class example2 {
  var $someobject;
function &Someobject(&$arg = NULL) {
  if (!is_null($arg))
    $this->someobject = &$arg;
return $this->someobject;
}
}

The second example will throw an parse error, expecting ) after &$arg.

I suppose this isn't an bug, but rather something not implemented or is intensional.

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=12809&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to