Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74224 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66342 invoked from network); 15 May 2014 13:10:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 May 2014 13:10:00 -0000 X-Host-Fingerprint: 221.225.132.164 unknown Received: from [221.225.132.164] ([221.225.132.164:28914] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/17-14382-5ACB4735 for ; Thu, 15 May 2014 09:09:57 -0400 Message-ID: <6B.17.14382.5ACB4735@pb1.pair.com> To: internals@lists.php.net Date: Thu, 15 May 2014 21:10:26 +0800 Lines: 4 X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 15.4.3502.922 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3502.922 X-RFC2646: Format=Flowed; Original X-Posted-By: 221.225.132.164 Subject: A little confusing thing when try to get something from a string using multi dim offset From: root@3ax.org ("\\R\\N") Hi guys, I posted a topic on php.general when I had some problem on getting something from a string using multi dim offset here: http://news.php.net/php.general/323297. Here is a TL;Summary version: $data = 'here\'s some data'; In PHP 5.5 it will be: var_dump(isset($data['string'])); === false var_dump(isset($data['string'][0])); === true Other bright people in php.general already explained how it happens, and I get it. But before get use to it, I think I should post this to do some ... complain ... if you will. It's confusing, I have to say. Because the isset($data['check']) is false, so the isset($data['check'][0]) should be false too, theoretically, but it's not. Is any chance to get var_dump(isset($data['string'])); === false var_dump(isset($data['string'][0])); === false <-- ? Because it will be more intuitively right and make PHP more user friendly. Thank you.