Doc #69012 [Ver->Asn]: examples in echo documentation are misleading

From: Date: Mon, 31 Dec 2018 17:05:18 +0000
Subject: Doc #69012 [Ver->Asn]: examples in echo documentation are misleading
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16262@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69012&edit=1 ID: 69012 Updated by: girgias@php.net Reported by: teo8976 at gmail dot com Summary: examples in echo documentation are misleading -Status: Verified +Status: Assigned Type: Documentation Problem Package: Strings related PHP Version: Irrelevant -Assigned To: +Assigned To: girgias Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2015-02-08 02:45:15] teo8976 at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.echo --- Example #1 echo examples Many of the examples (all except the first one, the 8th and 9th, and the last three) have nothing to do with echo itself but with how string literals work. Those examples would make perfect sense replacing 'echo' with '$somevar=' Putting those examples in the documentation for echo a) bloats the documentation of one language construct with unrelated stuff b) is misleading and ambiguous, potentially leading the reader to wrongly think that variable substitution in literal strings, or heredoc syntax, are somehow specific to echo, while they are not and can be used also without echo ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69012&edit=1

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