Re:Python alternatives for PHP functions
by tszming on Tuesday December 25, 2012 @05:11AM
(#4965677)
Not disagreeing what you said, but your quoted example of Python implementation of `nl2br` is wrong, the original PHP's implementation did handle all (\r\n, \n\r, \n and \r), see: http://php.net/manual/en/function.nl2br.php & http://phpjs.org/functions/nl2br/
[ Parent
| on HN ]
Re:Python alternatives for PHP functions
by carbocation on Tuesday December 25, 2012 @05:42AM
(#4965732)
Here's what's going on behind the scenes in PHP: https://gist.github.com/4372596
(Taken from https://github.com/php/php-src/blob/PHP-5.4.9/ext/standard/s... )