#49775 [NEW]: no return in example function in note

From: Date: Mon, 05 Oct 2009 09:31:37 +0000
Subject: #49775 [NEW]: no return in example function in note
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2880@lists.php.net to get a copy of this message
From: hubert at freejazz dot co dot uk Operating system: n/a PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: no return in example function in note Description: ------------ Note #91828 Note to nl2br function entry in manual by leaf at leafo dot net on 26-Jun-2009 08:02, there is no return statement so function does not work Reproduce code: --------------- --- From manual page: function.nl2br --- function mynl2br($text) { strtr($text, array("\n" => '<br />', "\r\n" =>'<br />')); } Expected result: ---------------- returns a string with newlines replaces by <br />s Actual result: -------------- returns nothing (needs a return before code on line 2 of function) -- Edit bug report at http://bugs.php.net/?id=49775&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49775&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49775&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49775&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49775&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49775&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49775&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49775&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49775&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49775&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49775&r=support Expected behavior: http://bugs.php.net/fix.php?id=49775&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49775&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49775&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49775&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49775&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49775&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49775&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49775&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49775&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49775&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49775&r=mysqlcfg

« previous php.doc.bugs (#2880) next »