note 76280 added to function.ArrayObject-offsetExists
| From: | goran at extensionsforjoomla dot com | Date: | Mon, 09 Jul 2007 10:52:35 +0000 |
| Subject: | note 76280 added to function.ArrayObject-offsetExists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128318@lists.php.net to get a copy of this message | ||
In versions prior to PHP 5.2.2 offsetExists() would return false if index value is null.
<?php
// running PHP 5.2.1
$params = new ArrayObject(array('INT'=>null, 'STR'=> null,
'BOOL'=>null, 'LOB'=>null));
$test = $params->offsetExists('INT');
var_dump($test);
// result would be bool(false)
// running PHP 5.2.2
$params = new ArrayObject(array('INT'=>null, 'STR'=> null,
'BOOL'=>null, 'LOB'=>null));
$test = $params->offsetExists('INT');
var_dump($test);
// result would be bool(true)
?>
Both tests where made on Windows platform.
----
Server IP: 69.147.83.197
Probable Submitter: 89.216.148.166
----
Manual Page -- http://www.php.net/manual/en/function.ArrayObject-offsetExists.php
Edit -- https://master.php.net/note/edit/76280
Del: integrated -- https://master.php.net/note/delete/76280/integrated
Del: useless -- https://master.php.net/note/delete/76280/useless
Del: bad code -- https://master.php.net/note/delete/76280/bad+code
Del: spam -- https://master.php.net/note/delete/76280/spam
Del: non-english -- https://master.php.net/note/delete/76280/non-english
Del: in docs -- https://master.php.net/note/delete/76280/in+docs
Del: other reasons-- https://master.php.net/note/delete/76280
Reject -- https://master.php.net/note/reject/76280
Search -- https://master.php.net/manage/user-notes.php