Hi!
> Compare: $str = str_replace('-', '_', $str);
>
> To: $str = $str->replace('-', '_');
>
> Or: $keys = array_keys($array);
>
> To: $keys = $array->keys();
>
> I think it looks a lot cleaner, self-explaining, shorter, and if you
> are used to write OOP, it fits better to the rest of your code.
I think it has very little difference and entirely a matter of personal
taste. But the thing is - nobody prevents anybody from writing an
extension that does string ops or array ops as an object. Yet it did not
happen in last 10 years, AFAIK.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227