php.net |  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
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: 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
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: fabiankessler at usa dot net
New email:
PHP Version: OS:

 

 [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.

greetings
fab

Patches

Pull Requests

History

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

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 02:01:27 2024 UTC