# Pseudo-objects (methods on arrays, strings, etc.)

- Thread: https://externals.io/message/61432
- Original archive: https://news-web.php.net/php.internals/61432
- Started by Support At Dev Temple on 2012-07-18T20:08:57+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #61432 — Support At Dev Temple — 2012-07-18T20:08:57+00:00

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

> I think there is something we can do around this...

Reviewing the php array functions it seems to me that a new API would benefit from some sort of more intuitive organization, possibly around meta concepts specific to use.

For example, I want to re-order an array (order is a meta-concept in this description) how I specifically want to re-order the array is a sub-concept or sub-property of this general thought process. If you're following me then an intuitive API would look something like array functions condensed into a small handful of more generalized functions that take an argument to specify their exact behavior. I.e. 

array_order($my_array, 'sort', 'alpha', 'asc'); 

as a rough idea or breaking away from the traditional API a bit further 

array_order->sort($my_array, 'alpha', 'asc');

I'm offering this as a general representation of the idea to organize and condense the API not as a fully flushed out representation of the end result so useful feedback would be around the concept and not the semantics hastily hatched code examples.

- Bill
