Re: PHP_Compat, signature changes

From: Date: Sat, 28 May 2005 16:17:18 +0000
Subject: Re: PHP_Compat, signature changes
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-37853@lists.php.net to get a copy of this message
Hey Aidan: On Sun, May 29, 2005 at 12:39:20AM +1000, Aidan Lister wrote: > > There are a number of functions for which the function signature has > changed. For example, microtime now has an added boolean, mkdir has a > recursive switch, etc. If they're new, optional arguments at the end of the list, you can use func_get_args() to deal with them on an optional basis. <?php function foo($one) { $args = func_get_args(); echo "one = $one\n"; if (count($args) > 1) { echo "two = $args[1]\n"; } } foo(1, 2); ?> --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.pear.dev (#37853) next »