summaryrefslogtreecommitdiff
path: root/ext/standard/rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/rand.c')
-rw-r--r--ext/standard/rand.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/standard/rand.c b/ext/standard/rand.c
index e97e0b46f0..9e83111f58 100644
--- a/ext/standard/rand.c
+++ b/ext/standard/rand.c
@@ -57,9 +57,10 @@ PHP_FUNCTION(rand)
RETURN_LONG(php_mt_rand() >> 1);
}
- if (zend_parse_parameters(argc, "ll", &min, &max) == FAILURE) {
- return;
- }
+ ZEND_PARSE_PARAMETERS_START(2, 2)
+ Z_PARAM_LONG(min)
+ Z_PARAM_LONG(max)
+ ZEND_PARSE_PARAMETERS_END();
if (max < min) {
RETURN_LONG(php_mt_rand_common(max, min));