note 129903 added to language.enumerations.basics

From: Date: Sat, 07 Dec 2024 00:45:14 +0000
Subject: note 129903 added to language.enumerations.basics
Groups: php.notes 
Request: Send a blank email to php-notes+get-221706@lists.php.net to get a copy of this message
"A zero-case enum is syntactically valid, if rather useless." PHP already has a zero-case enumerated type, called "never", used to indicate that a function never returns a value. That's about the only thing such a type is good for, and since never already does the job there's no point creating more. (And for the record, PHP also has a one-case enum already defined, namely NULL. Since a value of such a type doesn't carry any information, there's nothing another one can do that NULL couldn't, so there's not much point creating more of those either.) ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.137 (proxied: 222.153.153.210) ---- Manual Page -- https://php.net/manual/en/language.enumerations.basics.php Edit -- https://main.php.net/note/edit/129903 Del: integrated -- https://main.php.net/note/delete/129903/integrated Del: useless -- https://main.php.net/note/delete/129903/useless Del: bad code -- https://main.php.net/note/delete/129903/bad+code Del: spam -- https://main.php.net/note/delete/129903/spam Del: non-english -- https://main.php.net/note/delete/129903/non-english Del: in docs -- https://main.php.net/note/delete/129903/in+docs Del: other reasons-- https://main.php.net/note/delete/129903 Reject -- https://main.php.net/note/reject/129903 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221706) next »