Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73977 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6725 invoked from network); 6 May 2014 14:46:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 May 2014 14:46:46 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 74.125.82.47 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 74.125.82.47 mail-wg0-f47.google.com Received: from [74.125.82.47] ([74.125.82.47:59991] helo=mail-wg0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 71/E1-20698-5D5F8635 for ; Tue, 06 May 2014 10:46:46 -0400 Received: by mail-wg0-f47.google.com with SMTP id x12so7187414wgg.6 for ; Tue, 06 May 2014 07:46: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=MAU5QLEVGzizlkVB9zO7Clw2iKZpNGfCISNhdMgiC7c=; b=mSHPLrVTPnDwBE9tWpjhc48BJieO4O5eYy38cE59Z+Qh8XTCHn1QU2pqGQp22/kxED vAuTqPzQQtOuxZFLTLUgiWtil4F9mec7n1FvLr+Z31NfwEDiLjAL7Wq6021MZLJjXrZo BbBnxdm4jRFi6khcCxpnELWv0wsWEn/NA6LOKyLgXXhY1jC6opb45fIlagBQYhn+ZqB3 5qbWVv5hd4pH28G45nB5OD1kMes6FVT3zSwwcXdZ3BvXodkNPZ8pLW9BKNwxDjQXqmcP Bl65D7X0X8Dz2r9tC7v5zhkRsgC4MZd9VYg0V9b9+NJrvu+mR2JH9ix1e9sLdXxLr3d2 d1zA== X-Gm-Message-State: ALoCoQnCL9FeCYXDEybfY5khcMq6dpWB8hRABYlCuLMf30L4H4VcICBVgkzGpnYBwGdZppo55bxTKzFZ5suY5wma9rBfiLrl4C2z0EcRCNWxduAVdxoYR7jtX+6CbK0UWpclSrlmu3XR MIME-Version: 1.0 X-Received: by 10.194.78.4 with SMTP id x4mr2805449wjw.58.1399387602798; Tue, 06 May 2014 07:46:42 -0700 (PDT) Received: by 10.227.234.6 with HTTP; Tue, 6 May 2014 07:46:42 -0700 (PDT) In-Reply-To: References: Date: Tue, 6 May 2014 18:46:42 +0400 Message-ID: To: Levi Morrison Cc: Tjerk Anne Meesters , Julien Pauli , PHP Internals Content-Type: multipart/alternative; boundary=047d7bfcf914f7e33e04f8bc50a9 Subject: Re: [PHP-DEV] Re: 5dee3c11 break From: dmitry@zend.com (Dmitry Stogov) --047d7bfcf914f7e33e04f8bc50a9 Content-Type: text/plain; charset=UTF-8 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. --047d7bfcf914f7e33e04f8bc50a9--