Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86537 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66605 invoked from network); 10 Jun 2015 06:53:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2015 06:53:31 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.179 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.179 mail-qk0-f179.google.com Received: from [209.85.220.179] ([209.85.220.179:35712] helo=mail-qk0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 74/C0-61871-AEED7755 for ; Wed, 10 Jun 2015 02:53:30 -0400 Received: by qkhq76 with SMTP id q76so20696878qkh.2 for ; Tue, 09 Jun 2015 23:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=jHhzp0X/N1xZru4ayfZNuGqjl8YTbqvzQu5CjGGVPe4=; b=YB8Ph+KsUml/OUoI9u8/ynCKbiAQ27PK1MY/yWv085c4sARp/en6wMP+KUueNQ/DgO vjHRpBmscH6gOTna+CM3VGE1ld5N/mMwKrxEYkNaZKF3H9HHw/plgToYbgBa/GRmgQ+2 hGmeF2Bbayo4DsneZt+g5wTI0+yU7QLhjH3EIMPB2rahzYXYBxPWe1it39RN4D4Cmnzz 8P6HmeAIBkTvPM9S/tY77yyw8I+p1EvxzWC5c3C0R0uYXP8TqR+nITW9k9NhIOOs0Dwe mlCpoSy4GzdMpaWQzlrsCUHOeDLIZWtNEGpnpBWvWWHPdjpNv/yAPNJiFuoV9FKKbYIz k1VA== X-Received: by 10.140.41.9 with SMTP id y9mr1927117qgy.28.1433919207587; Tue, 09 Jun 2015 23:53:27 -0700 (PDT) Received: from [192.168.2.145] (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id u10sm3805878qgd.14.2015.06.09.23.53.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2015 23:53:26 -0700 (PDT) Message-ID: <5577DEE4.8030205@gmail.com> Date: Tue, 09 Jun 2015 23:53:24 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Yasuo Ohgaki , Matt Wilmas CC: Christoph Becker , "internals@lists.php.net" References: <5576051A.3040800@gmx.de> <55760771.6020802@gmail.com> <778F345F9918474AB8CAAB03082ECBF7@pc1> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Array dereferencing of scalars From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > $foo = 42; > $foo['bar']; // => NULL > $v = NULL; > $v[0][1][2][3][4][5][6][7][8][9]; // NULL > > this code is semantically wrong and I would like to have error/exception > for such > erroneous codes. It's inconsistent with array object, too. Why it's wrong? You try to get that's something not there, you get NULL. I don't see anything wrong. Adding fatal error about every little thing that isn't as expected never was how PHP worked. -- Stas Malyshev smalyshev@gmail.com