[php-src] Issue #8192: Cannot override DirectoryIterator::current() without return typehint in 8.1
| From: | iluuu1994 | Date: | Fri, 11 Mar 2022 23:59:55 +0000 |
| Subject: | [php-src] Issue #8192: Cannot override DirectoryIterator::current() without return typehint in 8.1 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240308@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8192
Comment Author: iluuu1994
I haven't actually checked but I *think* that might come down to no return type meaning
mixed|void. Since mixed|void is not a subtype of mixed but
the other way around, omitting the type here would make the signature incompatible. Although since
in PHP void still returns null that doesn't really matter. So
allowing this, at least for internal methods, could still make sense.