|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #10310 feature request
Submitted: 2001-04-12 15:29 UTC Modified: 2004-04-13 16:17 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: fabiankessler at usa dot net Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.0.4 OS: all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
30 - 16 = ?
Subscribe to this entry?

 [2001-04-12 15:29 UTC] fabiankessler at usa dot net
function foo($a, $b, $c='hello', $d='world') {
  echo $c;

i'd like to use
foo('a', 'b', NULL, 'c');
or even better
foo('a', 'b', , 'c');
to have it echo 'hello', the default value.

i have to workaround using 
function foo($a, $b, $c='hello', $d='world') {
  if (is_null($c)) $c = 'hello';
  echo $c;

is there a better way? i really miss this vb-feature.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-13 16:17 UTC]
wont happen. (PHP != VB)

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Sep 23 05:01:23 2023 UTC