On 03/31/2011 10:58 AM, Martin Scotta wrote:
> I think it's time to stop thinking in terms of "functions" and move
> forward to "abstractions"
> 
> $s1 = 'string';
> $s1->contains($s2); 
> 
> $s1->indexOf($s2) === strpos($s1, $s2);
> 
> Why can't the strings be exposed as pseudo-objects ? users can choose to
> use them as a regular strings or by calling methods on it.

This is actually something I have been toying with a bit. Adding the
ability to call methods on both strings and arrays. I still don't like
the idea of making them real objects as the overhead and the amount of
code that would need to be changed in the core and in every extension is
daunting. Anybody out there have a patch along these lines?

-Rasmus

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

Reply via email to