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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fmouse at fmp dot com
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Thu May 02 18:01:32 2024 UTC