note 127108 added to arrayaccess.offsetexists
| From: | Zeomni at main dot php dot net | Date: | Tue, 17 May 2022 07:54:32 +0000 |
| Subject: | note 127108 added to arrayaccess.offsetexists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-218479@lists.php.net to get a copy of this message | ||
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)
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.47 (proxied: 87.98.137.70)
----
Manual Page -- https://php.net/manual/en/arrayaccess.offsetexists.php
Edit -- https://main.php.net/note/edit/127108
Del: integrated -- https://main.php.net/note/delete/127108/integrated
Del: useless -- https://main.php.net/note/delete/127108/useless
Del: bad code -- https://main.php.net/note/delete/127108/bad+code
Del: spam -- https://main.php.net/note/delete/127108/spam
Del: non-english -- https://main.php.net/note/delete/127108/non-english
Del: in docs -- https://main.php.net/note/delete/127108/in+docs
Del: other reasons-- https://main.php.net/note/delete/127108
Reject -- https://main.php.net/note/reject/127108
Search -- https://main.php.net/manage/user-notes.php