ZEND_ME(reflection, __clone, arginfo_reflection__void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(reflection_type, allowsNull, arginfo_reflection__void, 0)
ZEND_ME(reflection_type, isBuiltin, arginfo_reflection__void, 0)
- ZEND_ME(reflection_type, __toString, arginfo_reflection__void, ZEND_ACC_DEPRECATED)
+ /* ReflectionType::__toString() is deprecated, but we currently do not mark it as such
+ * due to bad interaction with the PHPUnit error handler and exceptions in __toString().
+ * See PR2137. */
+ ZEND_ME(reflection_type, __toString, arginfo_reflection__void, 0)
PHP_FE_END
};
var_dump((string) $return);
?>
---EXPECTF--
+--EXPECT--
string(11) "Traversable"
-
-Deprecated: Function ReflectionType::__toString() is deprecated in %s on line %d
string(11) "Traversable"
string(6) "string"
-
-Deprecated: Function ReflectionType::__toString() is deprecated in %s on line %d
string(6) "string"
string(4) "Test"
-
-Deprecated: Function ReflectionType::__toString() is deprecated in %s on line %d
string(4) "Test"
string(4) "Test"
-
-Deprecated: Function ReflectionType::__toString() is deprecated in %s on line %d
string(4) "Test"