note 45673 added to function.func-get-arg

From: Date: Tue, 14 Sep 2004 22:09:13 +0000
Subject: note 45673 added to function.func-get-arg
Groups: php.notes 
Request: Send a blank email to php-notes+get-76694@lists.php.net to get a copy of this message
func_get_arg is useful, if you know the exact order of the arguments, or if the order doesn't matter. i use this function (or func_get_args) for example to create own sprintf wrappers. if you want to pass a variable number of arguments to a function it's in my opinion better, to submit it as a key/value array e.g.: <?php functioncall(array("param1" => "...",...)); ?> and 'extract' the array inside the function. you don't need to do tricks like type-checking for parameter-recognition, in this case. ---- Manual Page -- http://www.php.net/manual/en/function.func-get-arg.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45673 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45673&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45673&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#76694) next »