Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73978 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8263 invoked from network); 6 May 2014 14:48:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 May 2014 14:48:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 74.125.82.43 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 74.125.82.43 mail-wg0-f43.google.com Received: from [74.125.82.43] ([74.125.82.43:40438] helo=mail-wg0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/32-20698-C46F8635 for ; Tue, 06 May 2014 10:48:45 -0400 Received: by mail-wg0-f43.google.com with SMTP id l18so8014039wgh.26 for ; Tue, 06 May 2014 07:48:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=bc1Onx7C6YLwCpn1ROFPNsH/4JhhE7KV/iIGu733rK8=; b=CCuz1xgx/vcuwN3GexRk2TGiOqN2QdtDkx5LJ8ZM0HPWQI+BmNzcKEkPllHqAXB44v d21atUFf06Ic++AREvsDK1P1mknUzm6maxhvUB3yXyv0+O7XLcEYK27m7yeRd51xY0P0 rnPtDCkLHGCZsJeQqgf9Ou51nXlhgzPwD82oS1l3XI7AD/+JWh7W6eYl2ejLgYkFv/ii bWFm0s3M2yAHWUnT+wIxN2gnx59jGlQEug3nwO+VdkqNNAx2f8z36+c1XdPVrqcj6WNb S20TOuhGQ9qTcesHtti+GNeLCMRpTaDxA14dH4k5f/b/qhsrYn8asOCJpky0kf0IryXv wBtQ== X-Gm-Message-State: ALoCoQky/qm8nr6sSSMGmwK0fRVeE0f6BFVBw3ob7uD9jkcfHzRmh357NtBx/gMRBSjRmb46WpeBm3jSsj4C3XnAsBN3Z5VimBudJDr5KXogBuLP07eZ/G+TuYkrSUi6pZuV9hjJdfhw MIME-Version: 1.0 X-Received: by 10.194.62.40 with SMTP id v8mr795004wjr.91.1399387721971; Tue, 06 May 2014 07:48:41 -0700 (PDT) Received: by 10.227.234.6 with HTTP; Tue, 6 May 2014 07:48:41 -0700 (PDT) In-Reply-To: References: Date: Tue, 6 May 2014 18:48:41 +0400 Message-ID: To: Levi Morrison Cc: Tjerk Anne Meesters , Julien Pauli , PHP Internals Content-Type: multipart/alternative; boundary=047d7ba97ce212545a04f8bc58b0 Subject: Re: [PHP-DEV] Re: 5dee3c11 break From: dmitry@zend.com (Dmitry Stogov) --047d7ba97ce212545a04f8bc58b0 Content-Type: text/plain; charset=UTF-8 If you think the current behavior is right, we need protection from recursion (similar to __get()). Thanks. Dmitry. On Tue, May 6, 2014 at 6:46 PM, Dmitry Stogov wrote: > > > > On Tue, May 6, 2014 at 5:11 PM, Levi Morrison wrote: > >> On Tue, May 6, 2014 at 6:43 AM, Dmitry Stogov wrote: >> >>> zend_std_has_dimension() doesn't know what (check_empty == 2) means. >>> >>> check_empty == 0 - ISSET => we don't need to call offsetGet() and relay >>> on >>> offsetExists() return value. >>> check_empty == 1 - ISEMPTY => we should call offsetGet() after >>> offsetExists(). >>> >>> NULL values should be handled by offsetExists(). >>> >> >> I am a bit curious, `isset` checks that the variable exists and is not >> null; `empty` checks that the variable exists and is not empty. Why does >> one call `offsetGet` and not the other? Both look at the value. >> >> Sorry if I missed that bit of conversation. >> > > yeah, no problem :) > I also, don't talk that my opinion is completely right. > > I think that we make us and users more and more troubles with this messy > behavior. > > Actually, you introduced new behavior (NULL check) and broke at least ZF2 > and probably many based on it applications. > It leads to crash and it'll make bad php experience. > Then someone will report it as a security problem and we all will be > blamed :( > We shouldn't make existing applications crash! > > Thanks. Dmitry. > > --047d7ba97ce212545a04f8bc58b0--