Re: Possibilities to fix some really poor behaviors in PHP7
| From: | Stas Malyshev | Date: | Wed, 15 Oct 2014 01:23:57 +0000 |
| Subject: | Re: Possibilities to fix some really poor behaviors in PHP7 | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78084@lists.php.net to get a copy of this message | ||
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/