# Array objects & array functions

- Thread: https://externals.io/message/34504
- Original archive: https://news-web.php.net/php.internals/34504
- Started by Amir Abiri on 2008-01-05T14:44:42+00:00
- Messages: 2
- 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

---

## #34504 — Amir Abiri — 2008-01-05T14:44:42+00:00

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

Hi,

I was wondering if there are any plans to introduce the ability of array functions to work with
"array objects".

More specifically I was thinking of starting with adding an SPL interface called ArraySearchable,
and modifying php_search_array in ext/standard/array.c to accept an object that implements that
interface, in which case the appropriate interface method is called.

A

---

## #34597 — Stanislav Malyshev — 2008-01-07T19:14:25+00:00

URL: https://externals.io/message/34504#34597 · In reply to: #34504

> More specifically I was thinking of starting with adding an SPL interface called ArraySearchable,
> and modifying php_search_array in ext/standard/array.c to accept an object that implements that
> interface, in which case the appropriate interface method is called.

What this interface would do? I think standard Iterator's `next()`, 
 `current()` and valid() should be enough.
-- 
Stanislav Malyshev, Zend Software Architect
stas@zend.com   http://www.zend.com/
(408)253-8829   MSN: stas@zend.com
