1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/tests/basic/array_key_exists_null_deprecation.phpt

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)