From ecc02811ec4384de8afdbb8730280c781e12bc3e Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Fri, 31 May 2019 00:45:32 -0300 Subject: [PATCH] Ensure correct signatures for magic methods --- Zend/tests/magic_methods_011.phpt | 10 +++ Zend/tests/magic_methods_012.phpt | 10 +++ Zend/tests/magic_methods_013.phpt | 10 +++ Zend/tests/magic_methods_014.phpt | 10 +++ Zend/tests/magic_methods_015.phpt | 10 +++ Zend/tests/magic_methods_016.phpt | 10 +++ Zend/tests/magic_methods_017.phpt | 10 +++ Zend/tests/magic_methods_018.phpt | 10 +++ Zend/tests/magic_methods_019.phpt | 10 +++ .../magic_methods_inheritance_rules.phpt | 70 +++++++++++++++++++ ...hods_inheritance_rules_non_trivial_01.phpt | 18 +++++ ...hods_inheritance_rules_non_trivial_02.phpt | 18 +++++ Zend/tests/magic_methods_sleep.phpt | 10 +++ Zend/tests/magic_methods_wakeup.phpt | 10 +++ Zend/tests/return_types/019.phpt | 5 +- Zend/tests/return_types/033.phpt | 10 +++ Zend/tests/return_types/034.phpt | 10 +++ Zend/tests/return_types/035.phpt | 10 +++ Zend/tests/return_types/036.phpt | 11 +++ Zend/tests/return_types/037.phpt | 11 +++ Zend/tests/return_types/038.phpt | 10 +++ Zend/tests/return_types/039.phpt | 10 +++ Zend/tests/return_types/040.phpt | 10 +++ Zend/tests/return_types/041.phpt | 10 +++ Zend/tests/return_types/042.phpt | 24 +++++++ Zend/tests/return_types/043.phpt | 29 ++++++++ Zend/tests/return_types/044.phpt | 10 +++ Zend/zend_API.c | 53 +++++++++++++- .../ReflectionMethod_getModifiers_basic.phpt | 60 ++++++++++++++++ 29 files changed, 486 insertions(+), 3 deletions(-) create mode 100644 Zend/tests/magic_methods_011.phpt create mode 100644 Zend/tests/magic_methods_012.phpt create mode 100644 Zend/tests/magic_methods_013.phpt create mode 100644 Zend/tests/magic_methods_014.phpt create mode 100644 Zend/tests/magic_methods_015.phpt create mode 100644 Zend/tests/magic_methods_016.phpt create mode 100644 Zend/tests/magic_methods_017.phpt create mode 100644 Zend/tests/magic_methods_018.phpt create mode 100644 Zend/tests/magic_methods_019.phpt create mode 100644 Zend/tests/magic_methods_inheritance_rules.phpt create mode 100644 Zend/tests/magic_methods_inheritance_rules_non_trivial_01.phpt create mode 100644 Zend/tests/magic_methods_inheritance_rules_non_trivial_02.phpt create mode 100644 Zend/tests/magic_methods_sleep.phpt create mode 100644 Zend/tests/magic_methods_wakeup.phpt create mode 100644 Zend/tests/return_types/033.phpt create mode 100644 Zend/tests/return_types/034.phpt create mode 100644 Zend/tests/return_types/035.phpt create mode 100644 Zend/tests/return_types/036.phpt create mode 100644 Zend/tests/return_types/037.phpt create mode 100644 Zend/tests/return_types/038.phpt create mode 100644 Zend/tests/return_types/039.phpt create mode 100644 Zend/tests/return_types/040.phpt create mode 100644 Zend/tests/return_types/041.phpt create mode 100644 Zend/tests/return_types/042.phpt create mode 100644 Zend/tests/return_types/043.phpt create mode 100644 Zend/tests/return_types/044.phpt diff --git a/Zend/tests/magic_methods_011.phpt b/Zend/tests/magic_methods_011.phpt new file mode 100644 index 000000000000..5ce536ae403c --- /dev/null +++ b/Zend/tests/magic_methods_011.phpt @@ -0,0 +1,10 @@ +--TEST-- +__set first parameter should be a string when typed +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__set(): Parameter #1 ($name) must be of type string when declared in %s on line %d diff --git a/Zend/tests/magic_methods_012.phpt b/Zend/tests/magic_methods_012.phpt new file mode 100644 index 000000000000..4ac3952c4d87 --- /dev/null +++ b/Zend/tests/magic_methods_012.phpt @@ -0,0 +1,10 @@ +--TEST-- +__get first parameter should be a string when typed +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__get(): Parameter #1 ($name) must be of type string when declared in %s on line %d diff --git a/Zend/tests/magic_methods_013.phpt b/Zend/tests/magic_methods_013.phpt new file mode 100644 index 000000000000..03a4fb7ea7ff --- /dev/null +++ b/Zend/tests/magic_methods_013.phpt @@ -0,0 +1,10 @@ +--TEST-- +__isset first parameter should be a string when typed +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__isset(): Parameter #1 ($name) must be of type string when declared in %s on line %d diff --git a/Zend/tests/magic_methods_014.phpt b/Zend/tests/magic_methods_014.phpt new file mode 100644 index 000000000000..783b6003dc84 --- /dev/null +++ b/Zend/tests/magic_methods_014.phpt @@ -0,0 +1,10 @@ +--TEST-- +__unset first parameter should be a string when typed +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__unset(): Parameter #1 ($name) must be of type string when declared in %s on line %d diff --git a/Zend/tests/magic_methods_015.phpt b/Zend/tests/magic_methods_015.phpt new file mode 100644 index 000000000000..d5e93c9ef074 --- /dev/null +++ b/Zend/tests/magic_methods_015.phpt @@ -0,0 +1,10 @@ +--TEST-- +__call first parameter should be a string typed +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__call(): Parameter #1 ($name) must be of type string when declared in %s on line %d diff --git a/Zend/tests/magic_methods_016.phpt b/Zend/tests/magic_methods_016.phpt new file mode 100644 index 000000000000..a0ac45e42aeb --- /dev/null +++ b/Zend/tests/magic_methods_016.phpt @@ -0,0 +1,10 @@ +--TEST-- +__call second parameter should be an array when typed +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__call(): Parameter #2 ($arguments) must be of type array when declared in %s on line %d diff --git a/Zend/tests/magic_methods_017.phpt b/Zend/tests/magic_methods_017.phpt new file mode 100644 index 000000000000..9afb089f311c --- /dev/null +++ b/Zend/tests/magic_methods_017.phpt @@ -0,0 +1,10 @@ +--TEST-- +__callStatic first parameter should be a string typed +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__callStatic(): Parameter #1 ($name) must be of type string when declared in %s on line %d diff --git a/Zend/tests/magic_methods_018.phpt b/Zend/tests/magic_methods_018.phpt new file mode 100644 index 000000000000..faddd3cca11d --- /dev/null +++ b/Zend/tests/magic_methods_018.phpt @@ -0,0 +1,10 @@ +--TEST-- +__callStatic second parameter should be an array typed +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__callStatic(): Parameter #2 ($args) must be of type array when declared in %s on line %d diff --git a/Zend/tests/magic_methods_019.phpt b/Zend/tests/magic_methods_019.phpt new file mode 100644 index 000000000000..85823e6c4029 --- /dev/null +++ b/Zend/tests/magic_methods_019.phpt @@ -0,0 +1,10 @@ +--TEST-- +__unserialize first parameter must be an array +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__unserialize(): Parameter #1 ($name) must be of type array when declared in %s on line %d diff --git a/Zend/tests/magic_methods_inheritance_rules.phpt b/Zend/tests/magic_methods_inheritance_rules.phpt new file mode 100644 index 000000000000..e91fdc784809 --- /dev/null +++ b/Zend/tests/magic_methods_inheritance_rules.phpt @@ -0,0 +1,70 @@ +--TEST-- +Magic Methods inheritance rules +--FILE-- + +--EXPECT-- +No problems! diff --git a/Zend/tests/magic_methods_inheritance_rules_non_trivial_01.phpt b/Zend/tests/magic_methods_inheritance_rules_non_trivial_01.phpt new file mode 100644 index 000000000000..a57c8b7dc8e1 --- /dev/null +++ b/Zend/tests/magic_methods_inheritance_rules_non_trivial_01.phpt @@ -0,0 +1,18 @@ +--TEST-- +Magic Methods inheritance rules on a non-trivial class hierarchy +--FILE-- + +--EXPECTF-- +Fatal error: Declaration of C::__get(array|string $name): int must be compatible with B::__get(object|array|string $name): int in %s on line %d diff --git a/Zend/tests/magic_methods_inheritance_rules_non_trivial_02.phpt b/Zend/tests/magic_methods_inheritance_rules_non_trivial_02.phpt new file mode 100644 index 000000000000..72c20a788532 --- /dev/null +++ b/Zend/tests/magic_methods_inheritance_rules_non_trivial_02.phpt @@ -0,0 +1,18 @@ +--TEST-- +Magic Methods inheritance rules on a non-trivial class hierarchy +--FILE-- + +--EXPECTF-- +Fatal error: Declaration of C::__get(object|array|string $name): int|float must be compatible with B::__get(object|array|string $name): int in %s on line %d diff --git a/Zend/tests/magic_methods_sleep.phpt b/Zend/tests/magic_methods_sleep.phpt new file mode 100644 index 000000000000..593d8fc037bf --- /dev/null +++ b/Zend/tests/magic_methods_sleep.phpt @@ -0,0 +1,10 @@ +--TEST-- +__sleep cannot take arguments +--FILE-- + +--EXPECTF-- +Fatal error: Method Foo::__sleep() cannot take arguments in %s on line %d diff --git a/Zend/tests/magic_methods_wakeup.phpt b/Zend/tests/magic_methods_wakeup.phpt new file mode 100644 index 000000000000..f4edb33576bc --- /dev/null +++ b/Zend/tests/magic_methods_wakeup.phpt @@ -0,0 +1,10 @@ +--TEST-- +__wakeup cannot take arguments +--FILE-- + +--EXPECTF-- +Fatal error: Method Foo::__wakeup() cannot take arguments in %s on line %d diff --git a/Zend/tests/return_types/019.phpt b/Zend/tests/return_types/019.phpt index 4be32b24741d..652548c3f93c 100644 --- a/Zend/tests/return_types/019.phpt +++ b/Zend/tests/return_types/019.phpt @@ -1,10 +1,11 @@ --TEST-- -__clone cannot declare a return type +__clone can only declare void return --FILE-- --EXPECTF-- -Fatal error: %s::%s() cannot declare a return type in %s on line %d +Fatal error: Foo::__clone(): Return type must be void when declared in %s on line %d diff --git a/Zend/tests/return_types/033.phpt b/Zend/tests/return_types/033.phpt new file mode 100644 index 000000000000..e725465253fd --- /dev/null +++ b/Zend/tests/return_types/033.phpt @@ -0,0 +1,10 @@ +--TEST-- +__set can only declare void return +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__set(): Return type must be void when declared in %s on line %d diff --git a/Zend/tests/return_types/034.phpt b/Zend/tests/return_types/034.phpt new file mode 100644 index 000000000000..50324208cbc9 --- /dev/null +++ b/Zend/tests/return_types/034.phpt @@ -0,0 +1,10 @@ +--TEST-- +__isset can only declare a boolean return type +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__isset(): Return type must be bool when declared in %s on line %d diff --git a/Zend/tests/return_types/035.phpt b/Zend/tests/return_types/035.phpt new file mode 100644 index 000000000000..fa2d331f55e6 --- /dev/null +++ b/Zend/tests/return_types/035.phpt @@ -0,0 +1,10 @@ +--TEST-- +__unset can only declare void return +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__unset(): Return type must be void when declared in %s on line %d diff --git a/Zend/tests/return_types/036.phpt b/Zend/tests/return_types/036.phpt new file mode 100644 index 000000000000..2f0847f21b3d --- /dev/null +++ b/Zend/tests/return_types/036.phpt @@ -0,0 +1,11 @@ +--TEST-- +__toString can only declare string return type +--FILE-- + +--EXPECTF-- +Fatal error: Declaration of Foo::__toString(): bool must be compatible with Stringable::__toString(): string in %s on line %d diff --git a/Zend/tests/return_types/037.phpt b/Zend/tests/return_types/037.phpt new file mode 100644 index 000000000000..34569e494ec9 --- /dev/null +++ b/Zend/tests/return_types/037.phpt @@ -0,0 +1,11 @@ +--TEST-- +__debugInfo can only declare array as return type +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__debugInfo(): Return type must be ?array when declared in %s on line %d diff --git a/Zend/tests/return_types/038.phpt b/Zend/tests/return_types/038.phpt new file mode 100644 index 000000000000..a51658c45410 --- /dev/null +++ b/Zend/tests/return_types/038.phpt @@ -0,0 +1,10 @@ +--TEST-- +__serialize can only declare array as return type +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__serialize(): Return type must be array when declared in %s on line %d diff --git a/Zend/tests/return_types/039.phpt b/Zend/tests/return_types/039.phpt new file mode 100644 index 000000000000..15a420757c9a --- /dev/null +++ b/Zend/tests/return_types/039.phpt @@ -0,0 +1,10 @@ +--TEST-- +__unserialize can only declare void return +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__unserialize(): Return type must be void when declared in %s on line %d diff --git a/Zend/tests/return_types/040.phpt b/Zend/tests/return_types/040.phpt new file mode 100644 index 000000000000..736a400f4477 --- /dev/null +++ b/Zend/tests/return_types/040.phpt @@ -0,0 +1,10 @@ +--TEST-- +__sleep can only declare return as array +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__sleep(): Return type must be array when declared in %s on line %d diff --git a/Zend/tests/return_types/041.phpt b/Zend/tests/return_types/041.phpt new file mode 100644 index 000000000000..783e1444bc84 --- /dev/null +++ b/Zend/tests/return_types/041.phpt @@ -0,0 +1,10 @@ +--TEST-- +__wakeup can only declare return void +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__wakeup(): Return type must be void when declared in %s on line %d diff --git a/Zend/tests/return_types/042.phpt b/Zend/tests/return_types/042.phpt new file mode 100644 index 000000000000..069e0228ff99 --- /dev/null +++ b/Zend/tests/return_types/042.phpt @@ -0,0 +1,24 @@ +--TEST-- +__debugInfo can declare union return type +--FILE-- + +--EXPECT-- +No problems! diff --git a/Zend/tests/return_types/043.phpt b/Zend/tests/return_types/043.phpt new file mode 100644 index 000000000000..ecc5660c6264 --- /dev/null +++ b/Zend/tests/return_types/043.phpt @@ -0,0 +1,29 @@ +--TEST-- +Some magic methods can declare mixed return type +--FILE-- + +--EXPECT-- +Okay! diff --git a/Zend/tests/return_types/044.phpt b/Zend/tests/return_types/044.phpt new file mode 100644 index 000000000000..3b708a05a7fc --- /dev/null +++ b/Zend/tests/return_types/044.phpt @@ -0,0 +1,10 @@ +--TEST-- +__set_state can only declare object as return +--FILE-- + +--EXPECTF-- +Fatal error: Foo::__set_state(): Return type must be object when declared in %s on line %d diff --git a/Zend/zend_API.c b/Zend/zend_API.c index c6e4b03dfcf2..be83bfacba79 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2032,6 +2032,31 @@ static void zend_check_magic_method_args( } } +static void zend_check_magic_method_arg_type(uint32_t arg_num, const zend_class_entry *ce, const zend_function *fptr, int error_type, int arg_type) +{ + if ( + ZEND_TYPE_IS_SET(fptr->common.arg_info[arg_num].type) + && ! (ZEND_TYPE_FULL_MASK(fptr->common.arg_info[arg_num].type) & arg_type) + ) { + zend_error(error_type, "%s::%s(): Parameter #%d ($%s) must be of type %s when declared", + ZSTR_VAL(ce->name), ZSTR_VAL(fptr->common.function_name), + arg_num + 1, ZSTR_VAL(fptr->common.arg_info[arg_num].name), + ZSTR_VAL(zend_type_to_string((zend_type) ZEND_TYPE_INIT_MASK(arg_type)))); + } +} + +static void zend_check_magic_method_return_type(const zend_class_entry *ce, const zend_function *fptr, int error_type, int return_type) +{ + if ( + (fptr->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) + && (ZEND_TYPE_FULL_MASK(fptr->common.arg_info[-1].type) & ~return_type) + ) { + zend_error(error_type, "%s::%s(): Return type must be %s when declared", + ZSTR_VAL(ce->name), ZSTR_VAL(fptr->common.function_name), + ZSTR_VAL(zend_type_to_string((zend_type) ZEND_TYPE_INIT_MASK(return_type)))); + } +} + static void zend_check_magic_method_non_static( const zend_class_entry *ce, const zend_function *fptr, int error_type) { @@ -2086,31 +2111,42 @@ ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, } else if (zend_string_equals_literal(lcname, ZEND_CLONE_FUNC_NAME)) { zend_check_magic_method_args(0, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); - zend_check_magic_method_no_return_type(ce, fptr, error_type); + zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_VOID); } else if (zend_string_equals_literal(lcname, ZEND_GET_FUNC_NAME)) { zend_check_magic_method_args(1, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr, error_type); + zend_check_magic_method_arg_type(0, ce, fptr, error_type, MAY_BE_STRING); } else if (zend_string_equals_literal(lcname, ZEND_SET_FUNC_NAME)) { zend_check_magic_method_args(2, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr, error_type); + zend_check_magic_method_arg_type(0, ce, fptr, error_type, MAY_BE_STRING); + zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_VOID); } else if (zend_string_equals_literal(lcname, ZEND_UNSET_FUNC_NAME)) { zend_check_magic_method_args(1, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr, error_type); + zend_check_magic_method_arg_type(0, ce, fptr, error_type, MAY_BE_STRING); + zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_VOID); } else if (zend_string_equals_literal(lcname, ZEND_ISSET_FUNC_NAME)) { zend_check_magic_method_args(1, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr, error_type); + zend_check_magic_method_arg_type(0, ce, fptr, error_type, MAY_BE_STRING); + zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_BOOL); } else if (zend_string_equals_literal(lcname, ZEND_CALL_FUNC_NAME)) { zend_check_magic_method_args(2, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr, error_type); + zend_check_magic_method_arg_type(0, ce, fptr, error_type, MAY_BE_STRING); + zend_check_magic_method_arg_type(1, ce, fptr, error_type, MAY_BE_ARRAY); } else if (zend_string_equals_literal(lcname, ZEND_CALLSTATIC_FUNC_NAME)) { zend_check_magic_method_args(2, ce, fptr, error_type); zend_check_magic_method_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr, error_type); + zend_check_magic_method_arg_type(0, ce, fptr, error_type, MAY_BE_STRING); + zend_check_magic_method_arg_type(1, ce, fptr, error_type, MAY_BE_ARRAY); } else if (zend_string_equals_literal(lcname, ZEND_TOSTRING_FUNC_NAME)) { zend_check_magic_method_args(0, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); @@ -2119,21 +2155,36 @@ ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, zend_check_magic_method_args(0, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr, error_type); + zend_check_magic_method_return_type(ce, fptr, error_type, (MAY_BE_ARRAY | MAY_BE_NULL)); } else if (zend_string_equals_literal(lcname, "__serialize")) { zend_check_magic_method_args(0, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr, error_type); + zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_ARRAY); } else if (zend_string_equals_literal(lcname, "__unserialize")) { zend_check_magic_method_args(1, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr, error_type); + zend_check_magic_method_arg_type(0, ce, fptr, error_type, MAY_BE_ARRAY); + zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_VOID); } else if (zend_string_equals_literal(lcname, "__set_state")) { zend_check_magic_method_args(1, ce, fptr, error_type); zend_check_magic_method_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr, error_type); + zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_OBJECT); } else if (zend_string_equals_literal(lcname, "__invoke")) { zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr, error_type); + } else if (zend_string_equals_literal(lcname, "__sleep")) { + zend_check_magic_method_args(0, ce, fptr, error_type); + zend_check_magic_method_non_static(ce, fptr, error_type); + zend_check_magic_method_public(ce, fptr, error_type); + zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_ARRAY); + } else if (zend_string_equals_literal(lcname, "__wakeup")) { + zend_check_magic_method_args(0, ce, fptr, error_type); + zend_check_magic_method_non_static(ce, fptr, error_type); + zend_check_magic_method_public(ce, fptr, error_type); + zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_VOID); } } /* }}} */ diff --git a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt index 6e0a0645c544..c5fe6aa41a2f 100644 --- a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt +++ b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt @@ -32,10 +32,14 @@ class TestClass public final function fin() {} + public function __construct() {} + public function __destruct() {} public function __call($a, $b) {} + public static function __callStatic($a, $b) {} + public function __clone() {} public function __get($a) {} @@ -44,6 +48,8 @@ class TestClass public function __unset($a) {} + public function __invoke() {} + public function __isset($a) {} public function __tostring() {} @@ -55,6 +61,12 @@ class TestClass public static function __set_state($a) {} public function __autoload() {} + + public function __serialize() {} + + public function __unserialize($data) {} + + public function __debugInfo() {} } class DerivedClass extends TestClass {} @@ -102,6 +114,10 @@ Modifiers for method TestClass::fin(): 0x00000021 +Modifiers for method TestClass::__construct(): +0x00000001 + + Modifiers for method TestClass::__destruct(): 0x00000001 @@ -110,6 +126,10 @@ Modifiers for method TestClass::__call(): 0x00000001 +Modifiers for method TestClass::__callStatic(): +0x00000011 + + Modifiers for method TestClass::__clone(): 0x00000001 @@ -126,6 +146,10 @@ Modifiers for method TestClass::__unset(): 0x00000001 +Modifiers for method TestClass::__invoke(): +0x00000001 + + Modifiers for method TestClass::__isset(): 0x00000001 @@ -150,6 +174,18 @@ Modifiers for method TestClass::__autoload(): 0x00000001 +Modifiers for method TestClass::__serialize(): +0x00000001 + + +Modifiers for method TestClass::__unserialize(): +0x00000001 + + +Modifiers for method TestClass::__debugInfo(): +0x00000001 + + Modifiers for method TestClass::foo(): 0x00000001 @@ -166,6 +202,10 @@ Modifiers for method TestClass::fin(): 0x00000021 +Modifiers for method TestClass::__construct(): +0x00000001 + + Modifiers for method TestClass::__destruct(): 0x00000001 @@ -174,6 +214,10 @@ Modifiers for method TestClass::__call(): 0x00000001 +Modifiers for method TestClass::__callStatic(): +0x00000011 + + Modifiers for method TestClass::__clone(): 0x00000001 @@ -190,6 +234,10 @@ Modifiers for method TestClass::__unset(): 0x00000001 +Modifiers for method TestClass::__invoke(): +0x00000001 + + Modifiers for method TestClass::__isset(): 0x00000001 @@ -214,6 +262,18 @@ Modifiers for method TestClass::__autoload(): 0x00000001 +Modifiers for method TestClass::__serialize(): +0x00000001 + + +Modifiers for method TestClass::__unserialize(): +0x00000001 + + +Modifiers for method TestClass::__debugInfo(): +0x00000001 + + Modifiers for method TestInterface::int(): 0x00000041