Re: * New Parameter Parsing Functions *

From: Date: Tue, 24 Jul 2001 22:51:53 +0000
Subject: Re: * New Parameter Parsing Functions *
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-60911@lists.php.net to get a copy of this message
On Tue, 24 Jul 2001, Markus Fischer wrote: > I see, this coming from PHP-GTK developing ? > > Can you give an example for a function that takes some fixed > parameter (take a resource of some kind as an example) and the > next parameter being another resource OR an array of that other > resources ? > > I'm just wondering if I can put this all into a single > zend_parse_parameters() or if I'ld need to use some kind of if() > statement for this one. You will need to use something like this until [] specifiers are implemented. if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "rr", &res1, &res2) == FAILURE) { if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "ra", &res1, &res_arr) == FAILURE) { // output error message here } } -Andrei

« previous php.dev (#60911) next »