Also, the PHP functions are with almost every PHP version, so you don't need to include a class and make sure that all of the developers know how to use it. ArrayObject still blows my mind in its implementation and its use.
The thought did stay in the back of my mind, chewing and scratching its way forward (much like the bastard that suggested I shave 'that' area ending in the same results).
The issues
The speed of the Array object over the native array and functions.
The container for the built-in functions as class methods, do you change the name or do you alias and add support for the other?
Possible in PHP 5
While I have created code that looked like arrays, I have the issue of whether or not you return the scalar or array. I did think of having a stop key to determine whether or not to return the value or to return the arrayobject.
Code: Select all
<?php
$array['test'] = 'one'; // Hides help, continue, and parity
$array['test']['help'] = 'me';
$array['test']['continue'] = 'maybe';
$array['test']['continue']['maybe'] = 'okay do it'; // Fails
$array['test']['parity'] = '0';
$array['script'][] = 0;
$array['script'][] = 1;
$array['script'][] = 2;
var_dump($array);
?>The Question
Would this be a good idea? I don't think so, but I'm still going to implement it so that I can get it off my mind.