Hi!

> I am for making array a proper class with methods.
> 
> "Legacy" functions can be implemented as wrappers around it:
> 
>     function array_push(&$array, $value)
>     {
>         $array->push($value);
>     }

The problem there is that array has different semantics than object. Not
completely, but for example if you pass array to function, it is passed
by value and is not modified, but objects are always mutable when passed
to functions. Changing this semantics will break a lot of code.

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to