Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78084 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26688 invoked from network); 15 Oct 2014 01:24:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2014 01:24:03 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.67 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.67 smtp67.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.67] ([108.166.43.67:34110] helo=smtp67.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/D0-21008-0BCCD345 for ; Tue, 14 Oct 2014 21:24:01 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp25.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 54BCD1805BE; Tue, 14 Oct 2014 21:23:58 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp25.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 09C94180433; Tue, 14 Oct 2014 21:23:57 -0400 (EDT) X-Sender-Id: smalyshev@sugarcrm.com Received: from Stass-MacBook-Pro.local ([UNAVAILABLE]. [74.85.23.222]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.2.13); Wed, 15 Oct 2014 01:23:58 GMT Message-ID: <543DCCAD.3070708@sugarcrm.com> Date: Tue, 14 Oct 2014 18:23:57 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Rowan Collins , "internals@lists.php.net" References: <543C9E9F.80804@mabe.berlin> <543CCFEA.2080908@sugarcrm.com> <543D7D18.9010100@mabe.berlin> <543D8E87.9050606@sugarcrm.com> <543D9580.60202@gmail.com> In-Reply-To: <543D9580.60202@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Possibilities to fix some really poor behaviors in PHP7 From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > For the array-to-object conversion, no scanning is necessary, since the > internal implementation already knows which keys are integers and which > strings. For the vast majority of cases, the array passed in will have Could you explain this? How you know which keys are integers and which strings without actually checking them? > object. I would strongly suspect that most objects have very few > properties, and very few property names would pass a simple test of "is > first character a digit" but subsequently fail the full is numeric test. You still have to scan through all of them, even if they have no digits at all. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/