|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #77779 incorrect syntax
Submitted: 2019-03-21 18:55 UTC Modified: 2019-03-21 19:09 UTC
From: ulrich dot geiss at arcor dot de Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
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.
Block user comment
Status: Assign to:
Bug Type:
From: ulrich dot geiss at arcor dot de
New email:
PHP Version: OS:


 [2019-03-21 18:55 UTC] ulrich dot geiss at arcor dot de

on page the syntax line "echo ( string $arg1 [, string $... ] ) : void" is incorrect.
As stated later echo is NOT a function.  If used with "(", a comma-separated argument list and ")", echo will fail (error message: [Thu Mar 21 18:41:34.397179 2019] [php7:emerg] [pid 5218] [client] PHP Parse error:  syntax error, unexpected ',' in /var/www/html/album/now.php on line 9).
Please change the syntax-line to "echo string $arg1 [, string $... ]".

It took me some hours to find out the reason for the errors and to correct my php-scripts.

Thanks in advance
with kind regards

U. Geiß

Test script:
<!DOCTYPE html>
    <title>Server clock</title>
  echo 'The server says: My clock shows "' , date( 'c' ) , '"' ;     // correct syntax
  echo( 'The server says: My clock shows "' , date( 'c' ) , '"' ) ;  // syntax as shown on

Expected result:
The server says: My clock shows "2019-03-21T18:46:25+00:00" 

Actual result:
HTTP 500 error
That’s odd... the website can’t display this page
The site may be under maintenance or could have a programming error.
Try this
Go back to the last page
Try contacting the website’s owner
Report this issue

Privacy statement


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-03-21 19:09 UTC]
-Status: Open +Status: Not a bug
 [2019-03-21 19:09 UTC]
The prototypes shown in the descriptions are not supposed to be valid PHP code.  How to interpret them is detailed in "How to read a function definition" [1] section of the manual.


P.S. That page was slightly up to date, with regards to how we show return types.  The update page should be available online soon.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun May 16 22:01:24 2021 UTC