zlacker

[parent] [thread] 1 comments
1. sebste+(OP)[view] [source] 2022-12-08 13:55:38
Type hinting for arrays and all data structures

They'd gather back my respect when they get rid of all the moronic behavior they have in the functions of their global namespace

* Like sleep that returns 192 on windows but not on linux when you interrupt it

* hash_hmac that if you pass array to $data, php will generate a Warning, return a NULL and continue, I'll let you imagine how bad this is in the context of hmacs when null gets typecast to 0 later on

* etc

replies(1): >>zerocr+HS
2. zerocr+HS[view] [source] 2022-12-08 18:28:01
>>sebste+(OP)
The manual doesn't indicate the specific change (this is one area of weakness for the language), but hash_hmac already no longer does what you're talking about: passing a non-string there is a TypeError since 8.0.

Increased strictness in the types that can be passed to the built-in functions has been a general area of focus for the last several versions.

[go to top]