While it may certainly seem "lazy" I spend a large portion of my time in javascript and I like the syntax for arrays.
I cant seem to figure out if I can "prototype" the array "object" and give it methods that simply returns the appropriate function:
i.e.
$aMyArr = array();
$aMyArr->push($iNum);
where
array->push = function ($Foo) { if isset($Foo) { this[] = $Foo; }; }; // I am quite aware this is not valid. Demo purposes
if this is possible, is this going to make a large overhead just for ease of use?
The only other thing I can think of doing is making a new class that has one protected var that is an array, and cloning all the methods... which is basically what Im doing, but I don't want to call it class "myArr"... and then I have to make a constructor that will iterate what is passed in... and stuff... :-/