note 45673 deleted from function.func-get-arg by danbrown

From: Date: Fri, 06 Feb 2015 21:36:13 +0000
Subject: note 45673 deleted from function.func-get-arg by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-201663@lists.php.net to get a copy of this message
Note Submitter: harald at triptop dot org ---- 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.

« previous php.notes (#201663) next »