note 127108 deleted from arrayaccess.offsetexists by cmb

From: Date: Tue, 17 May 2022 11:56:06 +0000
Subject: note 127108 deleted from arrayaccess.offsetexists by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-218482@lists.php.net to get a copy of this message
Note Submitter: Zeomni ---- Be carefull this example is broken, you now have to type the return of implementation : public function offsetExists($name): bool This is due to the new feature of Internal Method Return Type which will break a lot of php backward compatibility : https://wiki.php.net/rfc/internal_method_return_types The example of this page is currently broken, raising a warning on PhP 8.1, and will be fatal on PhP 9.0. (IMHO, IMRT feature should be reconsidered, as it even break php.net docs, thoushands of projects and millions of install will be broken when moving to PhP8.1 / Php9.0, this is extremly bad for reputation and will make people to rewrite project and reconsidere the use of PhP)

« previous php.notes (#218482) next »