note 128737 added to types.comparisons

From: Date: Fri, 14 Jul 2023 16:26:54 +0000
Subject: note 128737 added to types.comparisons
Groups: php.notes 
Request: Send a blank email to php-notes+get-220696@lists.php.net to get a copy of this message
Be aware of the difference between checking the *value* of an array item, and checking the *existence* of an array item: <?php $arr = [ 'x' => 0, 'y' => null, ]; isset($arr['x']); // true, same as isset(0) isset($arr['y']); // false, same as isset(null) array_key_exists('y', $arr); // true, though the value is null array_key_exists('z', $arr); // false ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.159.168 (proxied: 31.151.0.154) ---- Manual Page -- https://php.net/manual/en/types.comparisons.php Edit -- https://main.php.net/note/edit/128737 Del: integrated -- https://main.php.net/note/delete/128737/integrated Del: useless -- https://main.php.net/note/delete/128737/useless Del: bad code -- https://main.php.net/note/delete/128737/bad+code Del: spam -- https://main.php.net/note/delete/128737/spam Del: non-english -- https://main.php.net/note/delete/128737/non-english Del: in docs -- https://main.php.net/note/delete/128737/in+docs Del: other reasons-- https://main.php.net/note/delete/128737 Reject -- https://main.php.net/note/reject/128737 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220696) next »