Re: PHP_Compat, signature changes

From: Date: Sat, 28 May 2005 17:42:42 +0000
Subject: Re: PHP_Compat, signature changes
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-37862@lists.php.net to get a copy of this message
"Daniel Convissor" <danielc@analysisandsolutions.com> wrote in message news:20050528161718.GA7999@panix.com... > 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 Thanks Dan! But this is not a solution to the problem :) Aidan

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