php-src/ext/reflection/tests/bug72661.phpt
Nikita Popov 530a8a3854 Fix and undeprecate ReflectionType::__toString()
Add deprecated _ZendTestClass::__toString() method to preserve
an existing test.

ReflectionType::__toString() will now return a complete
representation of the type, as it should have originally. Users
that relied on nullability being absent should have been pushed
to ReflectionNamedType::getName() by the deprecation of
ReflectionType::__toString() in PHP 7.1 / PHP 7.4.
2019-10-22 11:26:02 +02:00

11 lines
222 B
PHP

--TEST--
Bug #72661 (ReflectionType::__toString crashes with iterable)
--FILE--
<?php
function test(iterable $arg) { }
var_dump((string)(new ReflectionParameter("test", 0))->getType());
?>
--EXPECT--
string(8) "iterable"