ZPP expects "ll" instead of "l|l" what would match the "proto" and the
ARG_INFO.
--- /dev/null
+--TEST--
+Bug #70454 (IntlChar::forDigit second parameter should be optional)
+--SKIPIF--
+<?php if (!extension_loaded('intl')) die("skip requires ext/intl") ?>
+--FILE--
+<?php
+var_dump(IntlChar::forDigit(0));
+var_dump(IntlChar::forDigit(3));
+var_dump(IntlChar::forDigit(3, 10));
+var_dump(IntlChar::forDigit(10));
+var_dump(IntlChar::forDigit(10, 16));
+?>
+--EXPECT--
+int(48)
+int(51)
+int(51)
+int(0)
+int(97)
IC_METHOD(forDigit) {
zend_long digit, radix = 10;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &digit, &radix) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &digit, &radix) == FAILURE) {
return;
}