Doc #69012 [PATCH]: examples in echo documentation are misleading

From: Date: Sun, 20 Jan 2019 17:55:22 +0000
Subject: Doc #69012 [PATCH]: examples in echo documentation are misleading
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16351@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 Patch added by: girgias@php.net Reported by: teo8976 at gmail dot com Summary: examples in echo documentation are misleading Status: Assigned Type: Documentation Problem Package: Strings related PHP Version: Irrelevant Assigned To: girgias Block user comment: N Private report: N New Comment: 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 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 (#16351) next »