Uh oh!
There was an error while loading. Please reload this page.
Update array key exists key parameter for PHP 8.0.0 - #3135
Conversation
| <methodsynopsis> | ||
| <type>bool</type><methodname>array_key_exists</methodname> | ||
| <methodparam><type class="union"><type>string</type><type>int</type></type><parameter>key</parameter></methodparam> | ||
| <methodparam><type>mixed</type><parameter>key</parameter></methodparam> |
There was a problem hiding this comment.
It was always mixed in reality.
Please remove the changelog.
There was a problem hiding this comment.
Good point! Changelog removed
There was a problem hiding this comment.
Actually... it was string|int|null in PHP 7.4, and it would do the silent cast for null to an empty string.
PHP 8.0 changed this to allow all offset types that get implicitly coerced (so booleans, floats, and resources now are also accepted and might emit the corresponding warnings). So it turns out it does need a changelog, and the type actually is string|int|float|bool|resource|null.
Apologies for the mistake
There was a problem hiding this comment.
No worries! I'll make the updates and push up.
Uh oh!
There was an error while loading. Please reload this page.

As of 8.0.0 array_key_exists the
$keyparameter takes mixed arguments now (string, int, bool, null, and resource). So updated the docs to reflect that.Added screenshot for proof