> text_to_array($s) == str_split($s, 1)

No, because str_split always splits into 1 byte chunks.  text_to_array
would take the character set into account (or that's where the utility
in it would be)...



On Mon, Jun 20, 2011 at 1:06 PM, Stas Malyshev <smalys...@sugarcrm.com> wrote:
> Hi!
>
> On 6/20/11 9:57 AM, Todd Ruth wrote:
>>
>> Iterators are nice.  Having a "text_string_to_array" function
>> would also be fine.  For example:
>>
>> $s = 'hello';
>> foreach (text_string_to_array($s) as $x) {
>>     var_dump($x);
>> }
>
>
> text_to_array($s) == str_split($s, 1)
>
> --
> 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
>
>

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

Reply via email to