Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d
NULL
-Warning: Wrong parameter count for get_defined_constants() in %s on line %d
+Warning: get_defined_constants() expects at most 1 parameter, 2 given in %s on line %d
NULL
string(5) "array"
string(5) "array"
/* }}} */
-/* {{{ proto array get_defined_constants([mixed categorize])
+/* {{{ proto array get_defined_constants([bool categorize])
Return an array containing the names and values of all defined constants */
ZEND_FUNCTION(get_defined_constants)
{
- int argc = ZEND_NUM_ARGS();
-
- if (argc != 0 && argc != 1) {
- ZEND_WRONG_PARAM_COUNT();
+ zend_bool categorize = 0;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &categorize) == FAILURE) {
+ return;
}
array_init(return_value);
- if (argc) {
+ if (categorize) {
HashPosition pos;
zend_constant *val;
int module_number;