]> granicus.if.org Git - php/commitdiff
- New parameter parsing
authorFelipe Pena <felipe@php.net>
Wed, 7 Jan 2009 22:37:08 +0000 (22:37 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 7 Jan 2009 22:37:08 +0000 (22:37 +0000)
- Removed METHOD_NOTSTATIC_NUMPARAMS

28 files changed:
ext/reflection/php_reflection.c
ext/reflection/tests/ReflectionClass_getDefaultProperties_002.phpt
ext/reflection/tests/ReflectionClass_getDocComment_002.phpt
ext/reflection/tests/ReflectionClass_getInterfaces_004.phpt
ext/reflection/tests/ReflectionClass_getParentClass_001.phpt
ext/reflection/tests/ReflectionClass_modifiers_002.phpt
ext/reflection/tests/ReflectionFunction_getClosure_error.phpt
ext/reflection/tests/ReflectionMethod_006.phpt
ext/reflection/tests/ReflectionMethod_getDocComment_error.phpt
ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt
ext/reflection/tests/reflectionClass_FileInfo_error.phpt
ext/reflection/tests/reflectionClass_getConstants_error.phpt
ext/reflection/tests/reflectionClass_getConstructor_error.phpt
ext/reflection/tests/reflectionClass_getName_error.phpt
ext/reflection/tests/reflectionClass_isInstantiable_error.phpt
ext/reflection/tests/reflectionClass_isInternal_error.phpt
ext/reflection/tests/reflectionClass_isUserDefined_error.phpt
ext/reflection/tests/reflectionObject_FileInfo_error.phpt
ext/reflection/tests/reflectionObject_getConstants_error.phpt
ext/reflection/tests/reflectionObject_getConstructor_error.phpt
ext/reflection/tests/reflectionObject_getName_error.phpt
ext/reflection/tests/reflectionObject_isInstantiable_error.phpt
ext/reflection/tests/reflectionObject_isInternal_error.phpt
ext/reflection/tests/reflectionObject_isUserDefined_error.phpt
ext/reflection/tests/reflectionProperty_error.phpt
ext/reflection/tests/reflectionProperty_getDeclaringClass_variation1.phpt
ext/reflection/tests/reflectionProperty_getDocComment_error.phpt
ext/reflection/tests/reflectionProperty_isDefault_basic.phpt

index 16d1aba0b0ca72b53ffdbfa9fac839da5562c2ca..b5300685e91c170b23c620c25d5200cdbb5424f1 100644 (file)
@@ -78,11 +78,6 @@ ZEND_DECLARE_MODULE_GLOBALS(reflection)
                return;                                                                                             \
        }                                                                                                       \
 
-#define METHOD_NOTSTATIC_NUMPARAMS(ce, c) METHOD_NOTSTATIC(ce)                                              \
-       if (ZEND_NUM_ARGS() > c) {                                                                              \
-               ZEND_WRONG_PARAM_COUNT();                                                                           \
-       }                                                                                                       \
-
 /* Exception throwing macro */
 #define _DO_THROW(msg)                                                                                      \
        zend_throw_exception(reflection_exception_ptr, msg, 0 TSRMLS_CC);                                       \
@@ -1143,7 +1138,9 @@ static void _function_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask)
        reflection_object *intern;
        zend_function *mptr;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(mptr);
        RETURN_BOOL(mptr->common.fn_flags & mask);
 }
@@ -1562,7 +1559,9 @@ ZEND_METHOD(reflection_function, __toString)
        string str;
        zval* name;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(fptr);
        _default_lookup_entry(getThis(), "name", sizeof("name"), &name TSRMLS_CC);
        string_init(&str);
@@ -1575,7 +1574,9 @@ ZEND_METHOD(reflection_function, __toString)
    Returns this function's name */
 ZEND_METHOD(reflection_function, getName)
 {
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        _default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC);
 }
 /* }}} */
@@ -1587,7 +1588,9 @@ ZEND_METHOD(reflection_function, isClosure)
        reflection_object *intern;
        zend_function *fptr;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(fptr);
        RETURN_BOOL(intern->obj);
 }
@@ -1601,7 +1604,9 @@ ZEND_METHOD(reflection_function, getClosureThis)
        zend_function *fptr;
        zval* closure_this;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(fptr);
        if (intern->obj) {
                closure_this = zend_get_closure_this_ptr(intern->obj TSRMLS_CC);
@@ -1619,7 +1624,9 @@ ZEND_METHOD(reflection_function, isInternal)
        reflection_object *intern;
        zend_function *fptr;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(fptr);
        RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION);
 }
@@ -1632,7 +1639,9 @@ ZEND_METHOD(reflection_function, isUserDefined)
        reflection_object *intern;
        zend_function *fptr;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(fptr);
        RETURN_BOOL(fptr->type == ZEND_USER_FUNCTION);
 }
@@ -1658,7 +1667,9 @@ ZEND_METHOD(reflection_function, getFileName)
        reflection_object *intern;
        zend_function *fptr;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(fptr);
        if (fptr->type == ZEND_USER_FUNCTION) {
                RETURN_RT_STRING(fptr->op_array.filename, 1);
@@ -1674,7 +1685,9 @@ ZEND_METHOD(reflection_function, getStartLine)
        reflection_object *intern;
        zend_function *fptr;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(fptr);
        if (fptr->type == ZEND_USER_FUNCTION) {
                RETURN_LONG(fptr->op_array.line_start);
@@ -1690,7 +1703,9 @@ ZEND_METHOD(reflection_function, getEndLine)
        reflection_object *intern;
        zend_function *fptr;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(fptr);
        if (fptr->type == ZEND_USER_FUNCTION) {
                RETURN_LONG(fptr->op_array.line_end);
@@ -1706,7 +1721,9 @@ ZEND_METHOD(reflection_function, getDocComment)
        reflection_object *intern;
        zend_function *fptr;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(fptr);
        if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment.v) {
                RETURN_ZSTRL(ZEND_STR_TYPE, fptr->op_array.doc_comment, fptr->op_array.doc_comment_len, 1);
@@ -1723,7 +1740,9 @@ ZEND_METHOD(reflection_function, getStaticVariables)
        reflection_object *intern;
        zend_function *fptr;
        
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(fptr);
 
        /* Return an empty array in case no static variables exist */
@@ -1742,7 +1761,9 @@ ZEND_METHOD(reflection_function, getClosure)
        reflection_object *intern;
        zend_function *fptr;
        
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(fptr);
 
        zend_create_closure(return_value, fptr, NULL, NULL TSRMLS_CC);
@@ -2162,7 +2183,9 @@ ZEND_METHOD(reflection_parameter, __toString)
        parameter_reference *param;
        string str;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(param);
        string_init(&str);
        _parameter_string(&str, param->fptr, param->arg_info, param->offset, param->required, "" TSRMLS_CC);
@@ -2174,7 +2197,9 @@ ZEND_METHOD(reflection_parameter, __toString)
    Returns this parameters's name */
 ZEND_METHOD(reflection_parameter, getName)
 {
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        _default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC);
 }
 /* }}} */
@@ -2186,7 +2211,9 @@ ZEND_METHOD(reflection_parameter, getDeclaringFunction)
        reflection_object *intern;
        parameter_reference *param;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(param);
 
        if (!param->fptr->common.scope) {
@@ -2204,7 +2231,9 @@ ZEND_METHOD(reflection_parameter, getDeclaringClass)
        reflection_object *intern;
        parameter_reference *param;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(param);
 
        if (param->fptr->common.scope) {
@@ -2221,7 +2250,9 @@ ZEND_METHOD(reflection_parameter, getClass)
        parameter_reference *param;
        zend_class_entry **pce, *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(param);
 
        if (param->arg_info->class_name.v) {
@@ -2276,7 +2307,9 @@ ZEND_METHOD(reflection_parameter, isArray)
        reflection_object *intern;
        parameter_reference *param;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(param);
 
        RETVAL_BOOL(param->arg_info->array_type_hint);
@@ -2290,7 +2323,9 @@ ZEND_METHOD(reflection_parameter, allowsNull)
        reflection_object *intern;
        parameter_reference *param;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(param);
 
        RETVAL_BOOL(param->arg_info->allow_null);
@@ -2304,7 +2339,9 @@ ZEND_METHOD(reflection_parameter, isPassedByReference)
        reflection_object *intern;
        parameter_reference *param;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(param);
 
        RETVAL_BOOL(param->arg_info->pass_by_reference);
@@ -2318,7 +2355,9 @@ ZEND_METHOD(reflection_parameter, getPosition)
        reflection_object *intern;
        parameter_reference *param;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(param);
 
        RETVAL_LONG(param->offset);
@@ -2332,7 +2371,9 @@ ZEND_METHOD(reflection_parameter, isOptional)
        reflection_object *intern;
        parameter_reference *param;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(param);
 
        RETVAL_BOOL(param->offset >= param->required);
@@ -2347,7 +2388,9 @@ ZEND_METHOD(reflection_parameter, isDefaultValueAvailable)
        parameter_reference *param;
        zend_op *precv;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(param);
 
        if (param->fptr->type != ZEND_USER_FUNCTION)
@@ -2373,7 +2416,9 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
        parameter_reference *param;
        zend_op *precv;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(param);
 
        if (param->fptr->type != ZEND_USER_FUNCTION)
@@ -2584,7 +2629,9 @@ ZEND_METHOD(reflection_method, __toString)
        string str;
        zval* name;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(mptr);
        _default_lookup_entry(getThis(), "name", sizeof("name"), &name TSRMLS_CC);
        string_init(&str);
@@ -2894,7 +2941,9 @@ ZEND_METHOD(reflection_function, inNamespace)
        zval **name;
        zstr colon;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        if (zend_hash_find(Z_OBJPROP_P(getThis()), "name", sizeof("name"), (void **) &name) == FAILURE) {
                RETURN_FALSE;
        }
@@ -2920,7 +2969,9 @@ ZEND_METHOD(reflection_function, getNamespaceName)
        zval **name;
        zstr backslash;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        if (zend_hash_find(Z_OBJPROP_P(getThis()), "name", sizeof("name"), (void **) &name) == FAILURE) {
                RETURN_FALSE;
        }
@@ -2946,7 +2997,9 @@ ZEND_METHOD(reflection_function, getShortName)
        zval **name;
        zstr backslash;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        if (zend_hash_find(Z_OBJPROP_P(getThis()), "name", sizeof("name"), (void **) &name) == FAILURE) {
                RETURN_FALSE;
        }
@@ -2972,7 +3025,9 @@ ZEND_METHOD(reflection_method, isConstructor)
        reflection_object *intern;
        zend_function *mptr;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(mptr);
        /* we need to check if the ctor is the ctor of the class level we we 
         * looking at since we might be looking at an inherited old style ctor
@@ -2988,7 +3043,9 @@ ZEND_METHOD(reflection_method, isDestructor)
        reflection_object *intern;
        zend_function *mptr;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(mptr);
        RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_DTOR);
 }
@@ -3001,7 +3058,9 @@ ZEND_METHOD(reflection_method, getModifiers)
        reflection_object *intern;
        zend_function *mptr;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(mptr);
 
        RETURN_LONG(mptr->common.fn_flags);
@@ -3125,7 +3184,9 @@ ZEND_METHOD(reflection_class, getStaticProperties)
        HashPosition pos;
        zval **value;
        
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);    
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
 
        zend_update_class_constants(ce TSRMLS_CC);
@@ -3233,7 +3294,9 @@ ZEND_METHOD(reflection_class, getDefaultProperties)
        int count, i;
        HashTable *ht_list[3];
        
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);    
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
        array_init(return_value);
 
@@ -3287,7 +3350,9 @@ ZEND_METHOD(reflection_class, __toString)
        zend_class_entry *ce;
        string str;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
        string_init(&str);
        _class_string(&str, ce, intern->obj, "" TSRMLS_CC);
@@ -3299,7 +3364,9 @@ ZEND_METHOD(reflection_class, __toString)
    Returns the class' name */
 ZEND_METHOD(reflection_class, getName)
 {
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        _default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC);
 }
 /* }}} */
@@ -3311,7 +3378,9 @@ ZEND_METHOD(reflection_class, isInternal)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
        RETURN_BOOL(ce->type == ZEND_INTERNAL_CLASS);
 }
@@ -3324,7 +3393,9 @@ ZEND_METHOD(reflection_class, isUserDefined)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
        RETURN_BOOL(ce->type == ZEND_USER_CLASS);
 }
@@ -3337,7 +3408,9 @@ ZEND_METHOD(reflection_class, getFileName)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
        if (ce->type == ZEND_USER_CLASS) {
                RETURN_RT_STRING(ce->filename, 1);
@@ -3353,7 +3426,9 @@ ZEND_METHOD(reflection_class, getStartLine)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
        if (ce->type == ZEND_USER_FUNCTION) {
                RETURN_LONG(ce->line_start);
@@ -3369,7 +3444,9 @@ ZEND_METHOD(reflection_class, getEndLine)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
        if (ce->type == ZEND_USER_CLASS) {
                RETURN_LONG(ce->line_end);
@@ -3385,7 +3462,9 @@ ZEND_METHOD(reflection_class, getDocComment)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
        if (ce->type == ZEND_USER_CLASS && ce->doc_comment.v) {
                RETURN_ZSTRL(ZEND_STR_TYPE, ce->doc_comment, ce->doc_comment_len, 1);
@@ -3401,7 +3480,9 @@ ZEND_METHOD(reflection_class, getConstructor)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);    
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
 
        if (ce->constructor) {
@@ -3778,7 +3859,9 @@ ZEND_METHOD(reflection_class, getConstants)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);    
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }       
        GET_REFLECTION_OBJECT_PTR(ce);
        array_init(return_value);
        zend_hash_apply_with_argument(&ce->constants_table, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC);
@@ -3819,7 +3902,9 @@ static void _class_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
        RETVAL_BOOL(ce->ce_flags & mask);
 }
@@ -3832,7 +3917,9 @@ ZEND_METHOD(reflection_class, isInstantiable)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
        if (ce->ce_flags & (ZEND_ACC_INTERFACE | ZEND_ACC_EXPLICIT_ABSTRACT_CLASS | ZEND_ACC_IMPLICIT_ABSTRACT_CLASS)) {
                RETURN_FALSE;
@@ -3879,7 +3966,9 @@ ZEND_METHOD(reflection_class, getModifiers)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
 
        RETURN_LONG(ce->ce_flags);
@@ -4061,7 +4150,9 @@ ZEND_METHOD(reflection_class, getInterfaces)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
 
        /* Return an empty array if this class implements no interfaces */
@@ -4088,7 +4179,9 @@ ZEND_METHOD(reflection_class, getInterfaceNames)
        zend_class_entry *ce;
        zend_uint i;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
 
        /* Return an empty array if this class implements no interfaces */
@@ -4107,7 +4200,9 @@ ZEND_METHOD(reflection_class, getParentClass)
        reflection_object *intern;
        zend_class_entry *ce;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ce);
        
        if (ce->parent) {
@@ -4270,7 +4365,9 @@ ZEND_METHOD(reflection_class, inNamespace)
        zval **name;
        zstr colon;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        if (zend_hash_find(Z_OBJPROP_P(getThis()), "name", sizeof("name"), (void **) &name) == FAILURE) {
                RETURN_FALSE;
        }
@@ -4296,7 +4393,9 @@ ZEND_METHOD(reflection_class, getNamespaceName)
        zval **name;
        zstr colon;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        if (zend_hash_find(Z_OBJPROP_P(getThis()), "name", sizeof("name"), (void **) &name) == FAILURE) {
                RETURN_FALSE;
        }
@@ -4322,7 +4421,9 @@ ZEND_METHOD(reflection_class, getShortName)
        zval **name;
        zstr colon;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        if (zend_hash_find(Z_OBJPROP_P(getThis()), "name", sizeof("name"), (void **) &name) == FAILURE) {
                RETURN_FALSE;
        }
@@ -4477,7 +4578,9 @@ ZEND_METHOD(reflection_property, __toString)
        property_reference *ref;
        string str;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ref);
        string_init(&str);
        _property_string(&str, &ref->prop, NULL_ZSTR, "" TSRMLS_CC);
@@ -4489,7 +4592,9 @@ ZEND_METHOD(reflection_property, __toString)
    Returns the class' name */
 ZEND_METHOD(reflection_property, getName)
 {
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        _default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC);
 }
 /* }}} */
@@ -4499,7 +4604,9 @@ static void _property_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask) /* {{{
        reflection_object *intern;
        property_reference *ref;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ref);
        RETURN_BOOL(ref->prop.flags & mask);
 }
@@ -4555,7 +4662,9 @@ ZEND_METHOD(reflection_property, getDefaultValue)
        zval **zdef, *zv;
        zend_uchar utype = UG(unicode) ? IS_UNICODE : IS_STRING;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ref);
 
        if (ref->prop.flags & ZEND_ACC_STATIC) {
@@ -4582,7 +4691,9 @@ ZEND_METHOD(reflection_property, getModifiers)
        reflection_object *intern;
        property_reference *ref;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ref);
 
        RETURN_LONG(ref->prop.flags);
@@ -4725,7 +4836,9 @@ ZEND_METHOD(reflection_property, getDeclaringClass)
        zstr prop_name, class_name;
        int prop_name_len;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ref);
 
        if (zend_u_unmangle_property_name(UG(unicode)?IS_UNICODE:IS_STRING, ref->prop.name, ref->prop.name_length, &class_name, &prop_name) != SUCCESS) {
@@ -4754,7 +4867,9 @@ ZEND_METHOD(reflection_property, getDocComment)
        reflection_object *intern;
        property_reference *ref;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(ref);
        if (ref->prop.doc_comment.v) {
                RETURN_ZSTRL(ZEND_STR_TYPE, ref->prop.doc_comment, ref->prop.doc_comment_len, 1);
@@ -4771,12 +4886,10 @@ ZEND_METHOD(reflection_property, setAccessible)
        property_reference *ref;
        zend_bool visible;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 1);
-       GET_REFLECTION_OBJECT_PTR(ref);
-
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &visible) == FAILURE) {
                return;
        }
+       GET_REFLECTION_OBJECT_PTR(ref);
        ref->ignore_visibility = visible;
 }
 /* }}} */
@@ -4837,7 +4950,9 @@ ZEND_METHOD(reflection_extension, __toString)
        zend_module_entry *module;
        string str;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(module);
        string_init(&str);
        _extension_string(&str, module, "" TSRMLS_CC);
@@ -4849,7 +4964,9 @@ ZEND_METHOD(reflection_extension, __toString)
    Returns this extension's name */
 ZEND_METHOD(reflection_extension, getName)
 {
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        _default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC);
 }
 /* }}} */
@@ -4861,7 +4978,9 @@ ZEND_METHOD(reflection_extension, getVersion)
        reflection_object *intern;
        zend_module_entry *module;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(module);
 
        /* An extension does not necessarily have a version number */
@@ -4880,7 +4999,9 @@ ZEND_METHOD(reflection_extension, getFunctions)
        reflection_object *intern;
        zend_module_entry *module;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(module);
 
        array_init(return_value);
@@ -4930,7 +5051,9 @@ ZEND_METHOD(reflection_extension, getConstants)
        reflection_object *intern;
        zend_module_entry *module;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);        
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(module);
 
        array_init(return_value);
@@ -4962,7 +5085,9 @@ ZEND_METHOD(reflection_extension, getINIEntries)
        reflection_object *intern;
        zend_module_entry *module;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);        
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(module);
 
        array_init(return_value);
@@ -4997,7 +5122,9 @@ ZEND_METHOD(reflection_extension, getClasses)
        reflection_object *intern;
        zend_module_entry *module;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);        
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(module);
 
        array_init(return_value);
@@ -5012,7 +5139,9 @@ ZEND_METHOD(reflection_extension, getClassNames)
        reflection_object *intern;
        zend_module_entry *module;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);        
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(module);
 
        array_init(return_value);
@@ -5028,7 +5157,9 @@ ZEND_METHOD(reflection_extension, getDependencies)
        zend_module_entry *module;
        const zend_module_dep *dep;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);        
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(module);
        
        array_init(return_value);
@@ -5079,7 +5210,9 @@ ZEND_METHOD(reflection_extension, info)
        reflection_object *intern;
        zend_module_entry *module;
 
-       METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0);
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        GET_REFLECTION_OBJECT_PTR(module);
 
        php_info_print_module(module TSRMLS_CC);
index 6012f085514d3f7faa28776c84870dc2fb34f078..7c178ac8eadadf2caf260b71a1ef0d19e79dacc4 100644 (file)
@@ -19,27 +19,26 @@ var_dump($rc->getStaticProperties(array(1,2,3)));
 
 ?>
 --EXPECTF--
-
-Warning: Wrong parameter count for ReflectionClass::getDefaultProperties() in %s on line 5
+Warning: ReflectionClass::getDefaultProperties() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getDefaultProperties() in %s on line 6
+Warning: ReflectionClass::getDefaultProperties() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getDefaultProperties() in %s on line 7
+Warning: ReflectionClass::getDefaultProperties() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getDefaultProperties() in %s on line 8
+Warning: ReflectionClass::getDefaultProperties() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getStaticProperties() in %s on line 9
+Warning: ReflectionClass::getStaticProperties() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getStaticProperties() in %s on line 10
+Warning: ReflectionClass::getStaticProperties() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getStaticProperties() in %s on line 11
+Warning: ReflectionClass::getStaticProperties() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getStaticProperties() in %s on line 12
-NULL
\ No newline at end of file
+Warning: ReflectionClass::getStaticProperties() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
index 6668a8b65668ed62dc94a942e54ff454789afdc1..5bbd596488c5ada06224e8839820e791ddbe76b1 100644 (file)
@@ -13,15 +13,14 @@ var_dump($rc->getDocComment(true));
 var_dump($rc->getDocComment(array(1,2,3)));
 ?>
 --EXPECTF--
-
-Warning: Wrong parameter count for ReflectionClass::getDocComment() in %s on line 4
+Warning: ReflectionClass::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getDocComment() in %s on line 5
+Warning: ReflectionClass::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getDocComment() in %s on line 6
+Warning: ReflectionClass::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getDocComment() in %s on line 7
+Warning: ReflectionClass::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
index 5f42e4736d7797f45fa4fd3e148160a57b4e0add..f62d58cd728b5a483e1afab273f6b89b162cea65 100644 (file)
@@ -14,15 +14,14 @@ var_dump($rc->getInterfaces(true));
 var_dump($rc->getInterfaces(array(1,2,3)));
 ?>
 --EXPECTF--
-
-Warning: Wrong parameter count for ReflectionClass::getInterfaces() in %s on line 5
+Warning: ReflectionClass::getInterfaces() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getInterfaces() in %s on line 6
+Warning: ReflectionClass::getInterfaces() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getInterfaces() in %s on line 7
+Warning: ReflectionClass::getInterfaces() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getInterfaces() in %s on line 8
+Warning: ReflectionClass::getInterfaces() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
index a97ae5c5f5cb13ec9de397e26d40449278cf879c..bfbc12ee5271a245daa905697931aaabc4102691 100644 (file)
@@ -28,11 +28,11 @@ bool(false)
 
 Test bad params:
 
-Warning: Wrong parameter count for ReflectionClass::getParentClass() in %s on line 11
+Warning: ReflectionClass::getParentClass() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getParentClass() in %s on line 12
+Warning: ReflectionClass::getParentClass() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getParentClass() in %s on line 13
-NULL
\ No newline at end of file
+Warning: ReflectionClass::getParentClass() expects exactly 0 parameters, 2 given in %s on line %d
+NULL
index 3fa247454fc5b103276d6c16be916c975f3f2a2f..a3a567ccbb168cdf5bde823bf2dc4214a774c9f1 100644 (file)
@@ -14,15 +14,14 @@ var_dump($rc->getModifiers(array(1,2,3)));
 
 ?>
 --EXPECTF--
-
-Warning: Wrong parameter count for ReflectionClass::isFinal() in %s on line 4
+Warning: ReflectionClass::isFinal() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::isInterface() in %s on line 5
+Warning: ReflectionClass::isInterface() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::isAbstract() in %s on line 6
+Warning: ReflectionClass::isAbstract() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getModifiers() in %s on line 7
+Warning: ReflectionClass::getModifiers() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
index 76851ea5cce4a8c855db61a5e56bb406c0ed9be8..9a963e41ca71b151dfb7ad176395383c02019a56 100644 (file)
@@ -23,5 +23,5 @@ $closure = $func->getClosure('bar');
 --EXPECTF--
 *** Testing ReflectionFunction::getClosure() : error conditions ***
 
-Warning: Wrong parameter count for ReflectionFunction::getClosure() in %s on line %d
+Warning: ReflectionFunction::getClosure() expects exactly 0 parameters, 1 given in %s on line %d
 ===DONE===
index 294d70803579e3c8b71cfeb7f647b50ca36fd663..7f2eed73b27b76a7b44360a31755a9eee7546909 100644 (file)
@@ -35,7 +35,7 @@ var_dump($rm->getName(1));
 
 ?>
 --EXPECTF--
-Warning: ReflectionMethod::__construct() expects %s on line 3
+Warning: ReflectionMethod::__construct() expects exactly 1 parameter, 0 given in %s on line %d
 object(ReflectionMethod)#%d (2) {
   [u"name"]=>
   unicode(0) ""
@@ -43,7 +43,7 @@ object(ReflectionMethod)#%d (2) {
   unicode(0) ""
 }
 
-Warning: ReflectionMethod::__construct() expects %s on line 4
+Warning: ReflectionMethod::__construct() expects exactly 1 parameter, 3 given in %s on line %d
 object(ReflectionMethod)#%d (2) {
   [u"name"]=>
   unicode(0) ""
@@ -51,50 +51,50 @@ object(ReflectionMethod)#%d (2) {
   unicode(0) ""
 }
 
-Warning: Wrong parameter count for ReflectionMethod::isFinal() in %s on line 12
+Warning: ReflectionMethod::isFinal() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionMethod::isAbstract() in %s on line 13
+Warning: ReflectionMethod::isAbstract() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionMethod::isPrivate() in %s on line 14
+Warning: ReflectionMethod::isPrivate() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionMethod::isProtected() in %s on line 15
+Warning: ReflectionMethod::isProtected() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionMethod::isPublic() in %s on line 16
+Warning: ReflectionMethod::isPublic() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionMethod::isStatic() in %s on line 17
+Warning: ReflectionMethod::isStatic() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionMethod::isConstructor() in %s on line 18
+Warning: ReflectionMethod::isConstructor() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionMethod::isDestructor() in %s on line 19
+Warning: ReflectionMethod::isDestructor() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionMethod::getModifiers() in %s on line 20
+Warning: ReflectionMethod::getModifiers() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionFunctionAbstract::isInternal() in %s on line 21
+Warning: ReflectionFunctionAbstract::isInternal() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionFunctionAbstract::isUserDefined() in %s on line 22
+Warning: ReflectionFunctionAbstract::isUserDefined() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionFunctionAbstract::getFileName() in %s on line 23
+Warning: ReflectionFunctionAbstract::getFileName() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionFunctionAbstract::getStartLine() in %s on line 24
+Warning: ReflectionFunctionAbstract::getStartLine() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionFunctionAbstract::getEndLine() in %s on line 25
+Warning: ReflectionFunctionAbstract::getEndLine() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionFunctionAbstract::getStaticVariables() in %s on line 26
+Warning: ReflectionFunctionAbstract::getStaticVariables() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionFunctionAbstract::getName() in %s on line 27
-NULL
\ No newline at end of file
+Warning: ReflectionFunctionAbstract::getName() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
index b3e4d9e30f7ac9f8f721a95c0e340e0a68570876..02de25bab0f86b4176cd065ea7c43d6271b50c1f 100644 (file)
@@ -8,10 +8,8 @@ var_dump($rc->getDocComment(null));
 var_dump($rc->getDocComment('X'));
 ?>
 --EXPECTF--
-
-Warning: Wrong parameter count for ReflectionFunctionAbstract::getDocComment() in %s on line %d
+Warning: ReflectionFunctionAbstract::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionFunctionAbstract::getDocComment() in %s on line %d
+Warning: ReflectionFunctionAbstract::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
-
index 3e6ddc6b2c2fe86e5cec75328f2520ee169c323f..790444384d300b1cc5d7945ea5c16286f067e8fc 100644 (file)
@@ -236,7 +236,7 @@ int(65794)
 
 Wrong number of params:
 
-Warning: Wrong parameter count for ReflectionMethod::getModifiers() in %s on line %d
+Warning: ReflectionMethod::getModifiers() expects exactly 0 parameters, 1 given in %s on line %d
 
 ReflectionMethod::getModifiers() modifiers:
 int(256)
index d60d0406bc59cd350a7f295cd73586ac158ffc97..f8d3ca8c119c2dc2ba58bd794a2aa13bdc0ce5cf 100644 (file)
@@ -14,24 +14,24 @@ foreach ($methods as $method) {
 }
 ?>
 --EXPECTF--
-unicode(%d) "%s"
+unicode(%s) "%s"
 
-Warning: Wrong parameter count for ReflectionClass::getFileName() in %s on line 9
+Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getFileName() in %s on line 10
+Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
 int(2)
 
-Warning: Wrong parameter count for ReflectionClass::getStartLine() in %s on line 9
+Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getStartLine() in %s on line 10
+Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
 int(2)
 
-Warning: Wrong parameter count for ReflectionClass::getEndLine() in %s on line 9
+Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getEndLine() in %s on line 10
+Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
index 73c407d656713f1adafbc1796e0059038f357578..1784d712a40224974f210e56ea1a340cc9d4a5ec 100644 (file)
@@ -15,10 +15,10 @@ $rc->getConstants('A', 'B');
 
 ?>
 --EXPECTF--
-Warning: Wrong parameter count for ReflectionClass::getConstants() in %s on line 8
+Warning: ReflectionClass::getConstants() expects exactly 0 parameters, 1 given in %s on line %d
 
-Warning: Wrong parameter count for ReflectionClass::getConstants() in %s on line 9
+Warning: ReflectionClass::getConstants() expects exactly 0 parameters, 1 given in %s on line %d
 
-Warning: Wrong parameter count for ReflectionClass::getConstants() in %s on line 10
+Warning: ReflectionClass::getConstants() expects exactly 0 parameters, 1 given in %s on line %d
 
-Warning: Wrong parameter count for ReflectionClass::getConstants() in %s on line 11
+Warning: ReflectionClass::getConstants() expects exactly 0 parameters, 2 given in %s on line %d
index 8892b1d6b06c1e9700e2ee95f7ad3e293b869be6..7e8932a5ed688848f62b767bfce154e80b8d8574 100644 (file)
@@ -10,15 +10,14 @@ var_dump($rc->getConstructor(true));
 var_dump($rc->getConstructor(array(1,2,3)));
 ?>
 --EXPECTF--
-
-Warning: Wrong parameter count for ReflectionClass::getConstructor() in %s on line 4
+Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getConstructor() in %s on line 5
+Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getConstructor() in %s on line 6
+Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getConstructor() in %s on line 7
+Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
index 6f5699c931d718ee6ec7ea818a5c75aa888dfeef..06cc4155be7f091ea7402a8f54d5fb05cc029f70 100644 (file)
@@ -9,9 +9,8 @@ var_dump($r1->getName('X'));
 var_dump($r1->getName('X', true));
 ?> 
 --EXPECTF--
-Warning: Wrong parameter count for ReflectionClass::getName() in %s on line 5
+Warning: ReflectionClass::getName() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getName() in %s on line 6
+Warning: ReflectionClass::getName() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
index cc31a2f42c3c8932e24b69c9156435e561c0b6eb..52be239121500cf693a38c6a9e2695d750dc3339 100644 (file)
@@ -12,8 +12,8 @@ var_dump($reflectionClass->IsInstantiable(0, null));
 
 ?>
 --EXPECTF--
-Warning: Wrong parameter count for ReflectionClass::isInstantiable() in %s on line 7
+Warning: ReflectionClass::isInstantiable() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::isInstantiable() in %s on line 8
+Warning: ReflectionClass::isInstantiable() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
index b1117e8304aca16a72eabedf9d537f20e045661b..ef69a4c39398d1bd6fd1130d9d2985bc6093f0c3 100644 (file)
@@ -7,8 +7,8 @@ var_dump($r1->isInternal('X'));
 var_dump($r1->isInternal('X', true));
 ?>
 --EXPECTF--
-Warning: Wrong parameter count for ReflectionClass::isInternal() in %s on line 3
+Warning: ReflectionClass::isInternal() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::isInternal() in %s on line 4
+Warning: ReflectionClass::isInternal() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
index 077e4d6a6dbfff149c19b7f7b4ab51de585b915e..ac888841793cf68dcef1444b5a31c333d787557b 100644 (file)
@@ -7,8 +7,8 @@ var_dump($r1->isUserDefined('X'));
 var_dump($r1->isUserDefined('X', true));
 ?>
 --EXPECTF--
-Warning: Wrong parameter count for ReflectionClass::isUserDefined() in %s on line 3
+Warning: ReflectionClass::isUserDefined() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::isUserDefined() in %s on line 4
+Warning: ReflectionClass::isUserDefined() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
index e932c8ad546854b0fe88a0af4259a5d046aaaace..c6007b88fe3bf03b8b5be299721de0753f776442 100644 (file)
@@ -16,22 +16,22 @@ foreach ($methods as $method) {
 --EXPECTF--
 unicode(%d) "%s"
 
-Warning: Wrong parameter count for ReflectionClass::getFileName() in %s on line 9
+Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getFileName() in %s on line 10
+Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
 int(2)
 
-Warning: Wrong parameter count for ReflectionClass::getStartLine() in %s on line 9
+Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getStartLine() in %s on line 10
+Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
 int(2)
 
-Warning: Wrong parameter count for ReflectionClass::getEndLine() in %s on line 9
+Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getEndLine() in %s on line 10
+Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
index 81ec9ed2ed26dbbc2bb2a49ed9a2e787923f626c..d3b90805eb951f32d892604a1c2b0f853f55ff4c 100644 (file)
@@ -12,7 +12,6 @@ $rc->getConstants(true);
 
 ?>
 --EXPECTF--
-Warning: Wrong parameter count for ReflectionClass::getConstants() in %s on line 7
-
-Warning: Wrong parameter count for ReflectionClass::getConstants() in %s on line 8
+Warning: ReflectionClass::getConstants() expects exactly 0 parameters, 1 given in %s on line %d
 
+Warning: ReflectionClass::getConstants() expects exactly 0 parameters, 1 given in %s on line %d
index 5cabc2ed10e266ba1d621a20612a3b520529ee73..2f52de2ed8c142dbfccd9487e62e73864284e575 100644 (file)
@@ -10,15 +10,14 @@ var_dump($rc->getConstructor(true));
 var_dump($rc->getConstructor(array(1,2,3)));
 ?>
 --EXPECTF--
-
-Warning: Wrong parameter count for ReflectionClass::getConstructor() in %s on line 4
+Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getConstructor() in %s on line 5
+Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getConstructor() in %s on line 6
+Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getConstructor() in %s on line 7
+Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
index eb64244c1584bacfb2e0a37e0b5aa94ab6454de6..ff8e279e9b35b55971fe3eed6f0b47ea1cf2d683 100644 (file)
@@ -13,11 +13,11 @@ var_dump($r3->getName('x','y'));
 var_dump($r3->getName(0));
 ?>
 --EXPECTF--
-Warning: Wrong parameter count for ReflectionClass::getName() in %s on line 8
+Warning: ReflectionClass::getName() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getName() in %s on line 9
+Warning: ReflectionClass::getName() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::getName() in %s on line 10
+Warning: ReflectionClass::getName() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
index 8f418ac0e665395a57da8dc3ef44e0170125daf1..f993367b2d533bd01fdb65b3bdf0a4f8eaa02ad3 100644 (file)
@@ -15,8 +15,8 @@ var_dump($reflectionObject->IsInstantiable(0, null));
 
 ?>
 --EXPECTF--
-Warning: Wrong parameter count for ReflectionClass::isInstantiable() in %s on line 10
+Warning: ReflectionClass::isInstantiable() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::isInstantiable() in %s on line 11
+Warning: ReflectionClass::isInstantiable() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
index c22d74807293827a9ba56de3d89ae71f44a4ee28..996add6cd45b36ffe86823dd12eccd717271088f 100644 (file)
@@ -8,8 +8,8 @@ var_dump($r1->isInternal('X'));
 var_dump($r1->isInternal('X', true));
 ?>
 --EXPECTF--
-Warning: Wrong parameter count for ReflectionClass::isInternal() in %s on line 4
+Warning: ReflectionClass::isInternal() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::isInternal() in %s on line 5
+Warning: ReflectionClass::isInternal() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
index 70533cf3d6ec8a225394d87c54301039213af4f0..06be47ae674d6169c3e6028f7f4e3ec00d57b491 100644 (file)
@@ -8,8 +8,8 @@ var_dump($r1->isUserDefined('X'));
 var_dump($r1->isUserDefined('X', true));
 ?>
 --EXPECTF--
-Warning: Wrong parameter count for ReflectionClass::isUserDefined() in %s on line 4
+Warning: ReflectionClass::isUserDefined() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionClass::isUserDefined() in %s on line 5
+Warning: ReflectionClass::isUserDefined() expects exactly 0 parameters, 2 given in %s on line %d
 NULL
index b7822ea796198972e99f9aa5ce0f7eed01788c6b..b04badaa54390d1bdabca395ffbb43afcf69d0e5 100644 (file)
@@ -45,23 +45,23 @@ object(ReflectionProperty)#%d (2) {
   unicode(0) ""
 }
 
-Warning: Wrong parameter count for ReflectionProperty::getName() in %s on line %d
+Warning: ReflectionProperty::getName() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionProperty::isPrivate() in %s on line %d
+Warning: ReflectionProperty::isPrivate() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionProperty::isProtected() in %s on line %d
+Warning: ReflectionProperty::isProtected() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionProperty::isPublic() in %s on line %d
+Warning: ReflectionProperty::isPublic() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionProperty::isStatic() in %s on line %d
+Warning: ReflectionProperty::isStatic() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionProperty::getModifiers() in %s on line %d
+Warning: ReflectionProperty::getModifiers() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionProperty::isDefault() in %s on line %d
+Warning: ReflectionProperty::isDefault() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
index bfc88a31745d5bfc28b3a91a279c7da123c28942..0cc174ed9ba3b13bdb1ab2713e11dfa0a565d758 100644 (file)
@@ -24,4 +24,4 @@ object(ReflectionClass)#%d (1) {
 }
 Wrong number of params:
 
-Warning: Wrong parameter count for ReflectionProperty::getDeclaringClass() in %s on line %d
+Warning: ReflectionProperty::getDeclaringClass() expects exactly 0 parameters, 1 given in %s on line %d
index 12a62173c3ee2c35eb1125524564198ed2c4861a..dae7be2fb9dcd6616b7ab9dbbe6df6f267d3717a 100644 (file)
@@ -15,15 +15,14 @@ var_dump($rc->getDocComment(array(1, 2, 3)));
 
 ?>
 --EXPECTF--
-
-Warning: Wrong parameter count for ReflectionProperty::getDocComment() in %s on line %d
+Warning: ReflectionProperty::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionProperty::getDocComment() in %s on line %d
+Warning: ReflectionProperty::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionProperty::getDocComment() in %s on line %d
+Warning: ReflectionProperty::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for ReflectionProperty::getDocComment() in %s on line %d
+Warning: ReflectionProperty::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d
 NULL
index 99f7c8bbc6d6c23cd6476e537e56f01b692f2fe2..22ee117cc8bb6e6ff70f0249ea8863a0a5210704 100644 (file)
@@ -60,4 +60,4 @@ bool(true)
 **********************************
 Wrong number of params:
 
-Warning: Wrong parameter count for ReflectionProperty::isDefault() in %s on line %d
+Warning: ReflectionProperty::isDefault() expects exactly 0 parameters, 1 given in %s on line %d