|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-13 16:17 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 14:00:01 2025 UTC |
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