Curt Zirzow wrote:

$fixed = preg_replace("/(\r?\n)|\r/",'<br />',$oldstring);

on retrosopect.. reading into that regex i get:

unix: sets the standard to use \n
windows: can't really decide on \r or \n so just uses them both
mac: goes oposite of everybody and used \r instead.

It seems OS's can simply be described on how they treat EOL, all the
rest of the differences are side effects of this behaviour.

Yeah, of course... Think of how secure windows would be if they just used \n! ;)


--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to