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

From: Date: Tue, 12 Feb 2019 16:16:37 +0000
Subject: Doc #69012 [Asn->Csd]: examples in echo documentation are misleading
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16403@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: cmb@php.net Reported by: teo8976 at gmail dot com Summary: examples in echo documentation are misleading -Status: Assigned +Status: Closed Type: Documentation Problem Package: Strings related PHP Version: Irrelevant Assigned To: girgias Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2019-02-12 16:16:08] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&revision=346811 Log: Fix #69012: examples in echo documentation are misleading Patch provided by girgias. ------------------------------------------------------------------------ [2019-01-20 17:55:22] girgias@php.net The following patch has been added/updated: Patch Name: doc-fix-69012 Revision: 1548006922 URL: https://bugs.php.net/patch-display.php?bug=69012&patch=doc-fix-69012&revision=1548006922 ------------------------------------------------------------------------ [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 (#16403) next »