1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 12:13:02 +02:00
Files
archived-php-src/ext/reflection/tests/bug72661.phpt
Nikita Popov b964298c19 Deprecate ReflectionType::__toString()
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.
2019-06-05 15:33:52 +02:00

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"