php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18377 optional parameters passed by reference cause parse error
Submitted: 2002-07-16 17:06 UTC Modified: 2002-07-16 23:47 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: gk at proliberty dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.2.1 OS: linux 2.4.18
Private report: No CVE-ID: None
 [2002-07-16 17:06 UTC] gk at proliberty dot com
SAMPLE CODE TO REPRODUCE:
<?php

function foo( &$a = ""  ){ 
}
foo( );
?>

GENERATES ERROR:
 parse error, unexpected '=', expecting ')'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-16 23:47 UTC] sniper@php.net
This has been fixed in the ZendEngine2. 
Won't be fixed for ZE1, AFAIK.

--Jani

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 21:00:02 2026 UTC