Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78086 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29994 invoked from network); 15 Oct 2014 01:39:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2014 01:39:44 -0000 Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.44 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.220.44 mail-pa0-f44.google.com Received: from [209.85.220.44] ([209.85.220.44:46119] helo=mail-pa0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AB/81-21008-F50DD345 for ; Tue, 14 Oct 2014 21:39:43 -0400 Received: by mail-pa0-f44.google.com with SMTP id et14so299306pad.31 for ; Tue, 14 Oct 2014 18:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=8lYdpxHi8NVWQ9p7fjBytNdvmUbujpkTlZ+DD5ZMwm4=; b=LrjvaETTVkq3ALgl724F0yru8wAK4AD8zyJVYeMNKfi1H/+FlTVrho2dXgnuDsgME5 UljZ7yfhn3b+fUBIgH2JBVujPXIV+U7WunMzPxGWb4334/EosjLHVnVL09xSYwckroeJ Qkx/4MXBDjrRjWjreVN+znAkI0MXlKqWYHbyJdgiCeVD+jOD/K20+JP+ixLcLvAusevV v58bs4i+8dxGf2TmyPDB4xDSw18xmRdaU8CjCMA3ct0zlHrRBzfTmtaFHWCgboIbfrg6 aC3T7s7Ly9nf7lqEh7jnvBJ5EkOX6VMQG90+2EWBYmKjbG8Z+uo7HjsL+sIc24wqUeL8 f18g== X-Received: by 10.70.62.74 with SMTP id w10mr7424804pdr.140.1413337180369; Tue, 14 Oct 2014 18:39:40 -0700 (PDT) Received: from [10.233.124.163] ([14.100.132.248]) by mx.google.com with ESMTPSA id kw10sm16610954pab.0.2014.10.14.18.39.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 18:39:38 -0700 (PDT) References: <543C9E9F.80804@mabe.berlin> <543CCFEA.2080908@sugarcrm.com> <543D7D18.9010100@mabe.berlin> <543D8E87.9050606@sugarcrm.com> <543D9580.60202@gmail.com> <543DCCAD.3070708@sugarcrm.com> Mime-Version: 1.0 (1.0) In-Reply-To: <543DCCAD.3070708@sugarcrm.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-ID: Cc: Rowan Collins , "internals@lists.php.net" X-Mailer: iPhone Mail (11D257) Date: Wed, 15 Oct 2014 09:39:35 +0800 To: Stas Malyshev Subject: Re: [PHP-DEV] Possibilities to fix some really poor behaviors in PHP7 From: tjerk.meesters@gmail.com (Tjerk Meesters) > On 15 Oct, 2014, at 9:23 am, Stas Malyshev wrote:= >=20 > Hi! >=20 >> For the array-to-object conversion, no scanning is necessary, since the=20= >> internal implementation already knows which keys are integers and which=20= >> strings. For the vast majority of cases, the array passed in will have >=20 > Could you explain this? How you know which keys are integers and which > strings without actually checking them? He means there's no additional effort required to know whether the key of ea= ch element is a string or not, because that work has already been done at th= e insert/update stage.=20 >=20 >> object. I would strongly suspect that most objects have very few=20 >> properties, and very few property names would pass a simple test of "is=20= >> first character a digit" but subsequently fail the full is numeric test. >=20 > You still have to scan through all of them, even if they have no digits > at all. > --=20 > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20