php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69012 examples in echo documentation are misleading
Submitted: 2015-02-08 02:45 UTC Modified: 2019-02-12 16:16 UTC
From: teo8976 at gmail dot com Assigned: girgias (profile)
Status: Closed Package: Strings related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2015-02-08 02:45 UTC] 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




Patches

doc-fix-69012 (last revision 2019-01-20 17:55 UTC by girgias@php.net)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-14 16:40 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2017-01-28 12:53 UTC] cmb@php.net
-Package: Documentation problem +Package: Strings related
 [2018-12-31 17:05 UTC] girgias@php.net
-Status: Verified +Status: Assigned -Assigned To: +Assigned To: girgias
 [2019-01-20 17:55 UTC] 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
 [2019-02-12 16:16 UTC] 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-02-12 16:16 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2019-02-12 16:16 UTC] cmb@php.net
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.
 [2019-02-18 16:41 UTC] salathe@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=3b37f838c7d9508a608f47a93256b6ce82ce1a25
Log: Fix #69012: examples in echo documentation are misleading
 [2019-02-19 20:22 UTC] salathe@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=98e8f4141d56ff35ef4a1e62c6ebe9739b0bc3a6
Log: Fix #69012: examples in echo documentation are misleading
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Aug 17 15:01:26 2019 UTC