Make `always true` SPL methods return void

From: Date: Wed, 17 Jun 2020 02:00:09 +0000
Subject: Make `always true` SPL methods return void
Groups: php.internals 
Request: Send a blank email to internals+get-110615@lists.php.net to get a copy of this message
Hello, internals,

Inspired by the bug report #75958 (http://bugs.php.net/75958), I'd like to
change the return type of some SPL methods that are always returning true
and only true.

These "always true" returns make no sense, as you can't wrap it in an
if/else to catch something that happened, so changing it to
void and
just invoke these methods sounds reasonable to me.

You can find the PR, with some discussion already, at
https://github.com/php/php-src/pull/5314.

Can I proceed with these changes, or should I create an RFC for that?

-- Gabriel Caruso


Thread (5 messages)

« previous php.internals (#110615) next »