php3-list | 199908
Date: 08/04/99
- Next message: Rasmus Lerdorf: "Re: [PHP3] Re: [PHP4BETA] Re: [PHP3] OO"
- Previous message: Teodor Cimpoesu: "Re: [PHP3] Error compiling DSO!"
- In reply to: Chuck Hagenbuch: "Re: [PHP3] replace '_' with ' '"
- Next in thread: Rasmus Lerdorf: "Re: [PHP3] replace '_' with ' '"
- Reply: Rasmus Lerdorf: "Re: [PHP3] replace '_' with ' '"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
BTW: does php compile regular expressions into an automaton or are REs
interpreted? This would make a big speed difference for large arrays...
> Quoting Robert Aden <robert <email protected>>:
>
> > $string = str_replace("_", " ", $string);
> > or
> > $string = ereg_replace("_", " ", $string);
>
> Note that the former is vastly preferable in terms of speed/efficiency, and
> there's also a third (also fast) option:
>
> $string = strtr($string, '_', ' ');
>
> -chuck
>
Aaron.
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Rasmus Lerdorf: "Re: [PHP3] Re: [PHP4BETA] Re: [PHP3] OO"
- Previous message: Teodor Cimpoesu: "Re: [PHP3] Error compiling DSO!"
- In reply to: Chuck Hagenbuch: "Re: [PHP3] replace '_' with ' '"
- Next in thread: Rasmus Lerdorf: "Re: [PHP3] replace '_' with ' '"
- Reply: Rasmus Lerdorf: "Re: [PHP3] replace '_' with ' '"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

