Am 26.12.2017 um 16:56 schrieb Sebastian Bergmann:
Am 26.12.2017 um 16:46 schrieb li...@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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to