[PHP-DEV] PHP 4.0 Bug #4281: cannot use a referenced argument with defaulting From: andy <email protected>
Date: 04/29/00

From: andy <email protected>
Operating system: Linux 2.2.14
PHP version: 4.0 Beta 4
PHP Bug Type: Scripting Engine problem
Bug description: cannot use a referenced argument with defaulting

You cant use a reference with a default value (an optional function arg) when defining a function-- the parser will choke on this.

function ($somearg, &$object_ref = 0) {
  if($object_ref == 0) {
     ...
   }
  else { ... }
}

Maybe this fails because php needs a predefined NULL - which is a reference to the NULL object.

later...

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>