Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard rand.c From: Andrei Zmievski (andrei <email protected>)
Date: 09/05/01

On Wed, 05 Sep 2001, Sterling Hughes wrote:
> Ok, I'm sold... I understand the basics of the format and the
> function, but is the following possible?::
>
> In the situation of rand() when its that are two arguments are
> mandatory, or no arguments are mandatory?

I failed to parse this sentence at first, but then I remembered the
Bronx clean-up that Rasmus did on your XSLT stuff and it helped. :)

> Ie,
>
> rand() is valid and rand(1, 100) is valid, but rand(32) is not
> valid?

You can use regular ZEND_NUM_ARGS() check for the first case and use
zend_parse_parameters() for the second.

-Andrei

Any sufficiently advanced Operating System
is indistinguishable from Linux.
                              - Jim Dennis

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>