php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16795 function's optional parameter
Submitted: 2002-04-24 10:23 UTC Modified: 2002-04-24 10:59 UTC
From: emailleonid at start dot com dot au Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.2.0 OS: winxp
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: emailleonid at start dot com dot au
New email:
PHP Version: OS:

 

 [2002-04-24 10:23 UTC] emailleonid at start dot com dot au
when function defined in a maner
<?
 function test ($param = "$"){
   echo $param;
 }

 test();
?>

u get

Parse error: parse error in D:\InetPub\test.php on line 2

when

<?
 function test ($param = "a"){
   echo $param;
 }

 test();
?>

Everything works as planed

a

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-24 10:31 UTC] derick@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
 [2002-04-24 10:59 UTC] hholzgra@php.net
hint: try function test ($param = '$'){
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 19 18:00:02 2025 UTC