mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_using_values_null_as_an_array_offset_and_when_calling_array_key_exists
14 lines
355 B
PHP
14 lines
355 B
PHP
--TEST--
|
|
Deprecate using null as key in array_key_exists()
|
|
--FILE--
|
|
<?php
|
|
$arr = ['foo' => 'bar', '' => 'baz'];
|
|
|
|
var_dump(array_key_exists(null, $arr));
|
|
var_dump(array_key_exists('', $arr));
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in %s on line %d
|
|
bool(true)
|
|
bool(true)
|