mirror of
https://github.com/php/php-src.git
synced 2026-03-30 12:13:02 +02:00
We weren't able to do this in 7.1 because the deprecation notice may be converted to an exception and __toString() can't throw, which means that it ultimately become a fatal error. This issue is resolved now, so we can mark the method as deprecated.
12 lines
304 B
PHP
12 lines
304 B
PHP
--TEST--
|
|
Bug #72661 (ReflectionType::__toString crashes with iterable)
|
|
--FILE--
|
|
<?php
|
|
function test(iterable $arg) { }
|
|
|
|
var_dump((string)(new ReflectionParameter("test", 0))->getType());
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Function ReflectionType::__toString() is deprecated in %s on line %d
|
|
string(8) "iterable"
|