Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84453 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80374 invoked from network); 9 Mar 2015 04:03:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Mar 2015 04:03:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=reeze.xia@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=reeze.xia@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.169 as permitted sender) X-PHP-List-Original-Sender: reeze.xia@gmail.com X-Host-Fingerprint: 209.85.212.169 mail-wi0-f169.google.com Received: from [209.85.212.169] ([209.85.212.169:46680] helo=mail-wi0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/00-14455-68B1DF45 for ; Sun, 08 Mar 2015 23:03:20 -0500 Received: by wiwh11 with SMTP id h11so6502852wiw.5 for ; Sun, 08 Mar 2015 21:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=1lEcAgas11JDBxiANVXAgmqqTNbWN3i3qS+xDNN4jKo=; b=fNZUhkmvdTbRzQHftgmyP3/lWw1gWB59t3pdg9sFaclf3ki4dX5zxd5tOpeV17ZKmA zMcnJ6JNkXl1tTzi+DvtNm3v4KtOE4tCpVJnSgttwfMtzPpjl2VHk33bZ/GnPgSVO83e k7PM4oCbW9/+3PRltiM5uMsKOfIUExNIhNrJcshfpkYhR+NId1DzJQqpgCs8vR4mc7lN +HtghgmpcfhZ4S5o2wnTeH//LYz8SypO1+RySWkngquFuJhoptYUw4B8z+uL2n49xkDA i2t9LR9E8Gl88/naWe67gRWpSKQ36EdHPQjmxskbHMpy4fugwh1vbraiRqnLqodDYmFw 4iwA== X-Received: by 10.194.173.199 with SMTP id bm7mr14104814wjc.76.1425873796001; Sun, 08 Mar 2015 21:03:16 -0700 (PDT) MIME-Version: 1.0 Sender: reeze.xia@gmail.com Received: by 10.194.58.241 with HTTP; Sun, 8 Mar 2015 21:02:55 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 Mar 2015 12:02:55 +0800 X-Google-Sender-Auth: FbQqyxifgIy-P8OthR0LeYQP6K4 Message-ID: To: Pierre Joye Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0122f0741af6fd0510d31d99 Subject: Re: [PHP-DEV] [Discussion] Deprecate function sizeof() From: reeze@php.net (reeze) --089e0122f0741af6fd0510d31d99 Content-Type: text/plain; charset=ISO-8859-1 On 9 March 2015 at 06:44, Pierre Joye wrote: > On Sun, Mar 8, 2015 at 2:51 AM, reeze wrote: > > Hi internals, > > > > I'd like to deprecate function: sizeof() [1][2], which is an alias of > > count(). some people > > expect it return the memory size of the variable. > > > > The doc page's[1] user contributed notes indicate that too. > > > > What do you think? > > As I tend to like the idea to cleanup things, adding warning and > deprecation warnings for the sake of it is not too appealing to me. > Especially for this kind of things. > Yes it will not really fix the confusion, and it is a small problem, I know few decent projects use sizeof, we could make the old code involve and more consist. sizeof() was kept because of BC since PHP4.0, count() should be the recommended function. > > Cheers, > -- > Pierre > > @pierrejoye | http://www.libgd.org > -- Reeze Xia http://reeze.cn --089e0122f0741af6fd0510d31d99--