PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2009, PHP 5.2.11
+- Fixed bug #48629 (get_defined_constants() ignores categorize parameter).
+ (Felipe)
- Fixed bug #48276 (date("Y") on big endian machines produces the
wrong result). (Scott)
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"
Return an array containing the names and values of all defined constants */
ZEND_FUNCTION(get_defined_constants)
{
- int argc = ZEND_NUM_ARGS();
+ zend_bool categorize = 0;
- if (argc != 0 && argc != 1) {
- ZEND_WRONG_PARAM_COUNT();
+ 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;