php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #609 echo function syntax inconsistency
Submitted: 1998-08-02 17:37 UTC Modified: 1999-06-21 18:16 UTC
From: fmouse at fmp dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 3.0.1 OS: Linux 2.0.34, Apache 1.2.5
Private report: No CVE-ID: None
 [1998-08-02 17:37 UTC] fmouse at fmp dot com
The echo function appears to have a syntax inconsistency - not fatal, but a bit confusing.

The documented format for the the function is:

    echo(string arg1, string argn...);

This form produces a parse error if there is more than one argument.  On the other hand, leaving
out the parentheses as in:

    echo string arg1, string argn...; 

works as expected.  This isn't critical, but perhaps some notice needs to be made of the situation, or the
documentation needs to be updated to reflect this quirk.  It would have saved me a few minutes of 
farting around trying to figure out why echo() wouldn't work when I gave it multiple arguments as per
the docs.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-21 18:16 UTC] jim at cvs dot php dot net
Added a note to the docs.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 01 01:01:28 2024 UTC