> Le 13 févr. 2023 à 13:12, Robert Landers <landers.rob...@gmail.com> a écrit : > > I hope we can all agree that `null` is the absence of a value. Now we > currently have two different meanings of "absence of a value" which is > super annoying sometimes. > Although `null` is often used with that semantics in mind, from a technical point of view, it is definitely not the same thing as “absence of a value”. For example: ```php function dump_answer($answer = 42) { var_dump($answer); } // null dump_answer(null); // NULL // absence of value dump_answer(); // int(42) ``` Or: ```php $a = [ 'foo' => null ]; // has value `null` var_dump(array_key_exists('foo', $a)); // true // is absent var_dump(array_key_exists('bar', $a)); // false ``` —Claude -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php
- Re: [PHP-DEV] 'Uninitialized' creates a lot of cluttering Kamil Tekiela
- Re: [PHP-DEV] 'Uninitialized' creates a lot of clutter... naitsirch
- Re: [PHP-DEV] 'Uninitialized' creates a lot of clu... Tim Düsterhus
- Re: [PHP-DEV] 'Uninitialized' creates a lot of... Kamil Tekiela
- Re: [PHP-DEV] 'Uninitialized' creates a lot of... naitsirch
- Re: [PHP-DEV] 'Uninitialized' creates a lot of... Lydia de Jongh
- Re: [PHP-DEV] 'Uninitialized' creates a lo... Tim Düsterhus
- Re: [PHP-DEV] 'Uninitialized' creates a lo... Rowan Tommins
- Re: [PHP-DEV] 'Uninitialized' creates... Robert Landers
- Re: [PHP-DEV] 'Uninitialized' cre... Andreas Heigl
- Re: [PHP-DEV] 'Uninitialized' cre... Claude Pache
- Re: [PHP-DEV] 'Uninitialized' creates a lot of clutter... Lydia de Jongh
- Re: [PHP-DEV] 'Uninitialized' creates a lot of clu... Rowan Tommins
- Re: [PHP-DEV] 'Uninitialized' creates a lot of cluttering Mike Schinkel