Re: [RFC] [DISCUSSION] Scalar Pseudo-type

From: Date: Tue, 26 Dec 2017 16:08:36 +0000
Subject: Re: [RFC] [DISCUSSION] Scalar Pseudo-type
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-101422@lists.php.net to get a copy of this message
Am 26.12.2017 um 16:56 schrieb Sebastian Bergmann:
Am 26.12.2017 um 16:46 schrieb lists@rhsoft.net:
would you mind to explain this?
"Foo|Bar", "array|string", etc. (still) make no sense to me. "scalar" makes sense to me although it is but an alias for "bool|float|int|string".
honestly *that* makes no sense for me with "float|int" you would have no need for dozens of aliases, in that case "numeric" when i expect some number but not a string and not a boolean return by a strpos() or similar functions also i have function which allows "int|array" where the internal logic loops the array internally but i don't want a random boolean or string there it's all about express accepted types as strict as possible in code to find errors early and in strict_types mode even the caller which needs to be fixed in the stack-trace

« previous php.internals (#101422) next »