|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-12-17 22:41 UTC] gmtfn at yahoo dot com
Description:
------------
In the code sample provided, for some reason, $nonexistentElement gets assigned a value of 5. I'd expect this to trigger an error.
Test script:
---------------
$params = array('search'=>'5');
$nonexistentElement = $params['search']['filter'];
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 10:00:01 2025 UTC |
Thank you both. Because of this, I've switched to using an object in place of an array where I noticed this behavior. By the way, The correct pseudo code is: $params['search']['filter'] => '5'["filter"] => '5'[0] => '5'