note 128956 added to language.enumerations.static-methods

From: Date: Fri, 13 Oct 2023 20:34:27 +0000
Subject: note 128956 added to language.enumerations.static-methods
Groups: php.notes 
Request: Send a blank email to php-notes+get-220915@lists.php.net to get a copy of this message
Note, that enums are internally declared as final and thus, cannot extend each other (though, they are allowed to extend other classes). That also means, that the "Size::fromLength()" method from this page's example redundantly uses "static::" (because there's no late static binding required), and could easily use "self::" or "Size::" instead. See: https://php.watch/versions/8.1/enums#enum-inheritance ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.157.134 (proxied: 2a01:c23:8827:2500:ede2:a693:6d8b:374e) ---- Manual Page -- https://php.net/manual/en/language.enumerations.static-methods.php Edit -- https://main.php.net/note/edit/128956 Del: integrated -- https://main.php.net/note/delete/128956/integrated Del: useless -- https://main.php.net/note/delete/128956/useless Del: bad code -- https://main.php.net/note/delete/128956/bad+code Del: spam -- https://main.php.net/note/delete/128956/spam Del: non-english -- https://main.php.net/note/delete/128956/non-english Del: in docs -- https://main.php.net/note/delete/128956/in+docs Del: other reasons-- https://main.php.net/note/delete/128956 Reject -- https://main.php.net/note/reject/128956 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220915) next »