|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2019-07-02 10:06 UTC] cxlblm at gmail dot com
Description:
------------
Deprecated: Function ReflectionType::__toString() is deprecated with set_error_handler blocked
Test script:
---------------
<?php
function handleError($level, $message, $file = '', $line = 0, $context = [])
{
throw new ErrorException($message, 0, $level, $file, $line);
}
set_error_handler('handleError');
class A
{
public function abc(): bool
{
return false;
}
}
$r = new ReflectionMethod("A", "abc");
(string)$r->getReturnType();
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 10:00:01 2025 UTC |
What is the bug? I get: Fatal error: Uncaught ErrorException: Function ReflectionType::__toString() is deprecated in /home/nikic/php-7.4/t077.php:20 Stack trace: #0 /home/nikic/php-7.4/t077.php(20): handleError(8192, 'Function Reflec...', '/home/nikic/php...', 20, Array) #1 {main} thrown in /home/nikic/php-7.4/t077.php on line 20 Which looks correct to me.