# HANDLE_NUMERIC()

- Thread: https://externals.io/message/1903
- Original archive: https://news-web.php.net/php.internals/1903
- Started by Sterling Hughes on 2003-05-22T16:52:25+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #1903 — Sterling Hughes — 2003-05-22T16:52:25+00:00

URL: https://externals.io/message/1903#1903

Hi,

I've attached a small patch which removes HANDLE_NUMERIC() from
zend_hash.c, and moves it instead to the necessary places in
zend_execute.c, in the form of a zend_is_numeric_key() function defined
in zend_operators.c

Anyhow, I'm getting a really nice performance increase.  Although it
depends on the usage, it certainly makes pretty much everything zippier
(and dare I say sexier. :)

-Sterling
-- 
"First they ignore you, then they laugh at you,  
 then they fight you, then you win."  
    - Gandhi

---

## #1905 — Andi Gutmans — 2003-05-22T18:58:50+00:00

URL: https://externals.io/message/1903#1905 · In reply to: #1903

At 12:52 PM 5/22/2003 -0400, Sterling Hughes wrote:
>Hi,
>
>I've attached a small patch which removes HANDLE_NUMERIC() from
>zend_hash.c, and moves it instead to the necessary places in
>zend_execute.c, in the form of a zend_is_numeric_key() function defined
>in zend_operators.c
>
>Anyhow, I'm getting a really nice performance increase.  Although it
>depends on the usage, it certainly makes pretty much everything zippier
>(and dare I say sexier. :)

I'm not sure you can be certain that other places in PHP don't use the 
feature of HANDLE_NUMERIC.
Seems to be quite a dangerous patch to me even if you solved it for the 
symbol table.

Andi

---

## #1925 — Andi Gutmans — 2003-05-23T12:10:03+00:00

URL: https://externals.io/message/1903#1925 · In reply to: #1903

Sterling,

I discussed your patch with Zeev. He convinced me that the chance of other 
PHP extensions taking advantage of HANDLE_NUMERIC is slim and that if this 
exists, we'll find it by the time we release PHP 5.
So I think you should commit it.

Andi

At 09:58 PM 5/22/2003 +0300, Andi Gutmans wrote:
>At 12:52 PM 5/22/2003 -0400, Sterling Hughes wrote:
> > […]
>
>I'm not sure you can be certain that other places in PHP don't use the 
>feature of HANDLE_NUMERIC.
>Seems to be quite a dangerous patch to me even if you solved it for the 
>symbol table.
>
>Andi
