Doc #77779 [NEW]: incorrect syntax
| From: | ulrich dot geiss at arcor dot de | Date: | Thu, 21 Mar 2019 18:55:52 +0000 |
| Subject: | Doc #77779 [NEW]: incorrect syntax | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-16499@lists.php.net to get a copy of this message | ||
From: ulrich dot geiss at arcor dot de
Operating system:
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:incorrect syntax
Description:
------------
Hello,
on page http://php.net/manual/en/function.echo.php 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
192.168.0.33:62292] 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>
<html>
<head>
<title>Server clock</title>
</head>
<body>
<?php
echo 'The server says: My clock shows "' , date( 'c' ) ,
'"' ; //
correct syntax
echo( 'The server says: My clock shows "' , date( 'c' ) ,
'"' ) ; //
syntax as shown on http://php.net/manual/en/function.echo.php
?>
</body>
</html>
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
--
Edit bug report at https://bugs.php.net/bug.php?id=77779&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77779&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77779&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77779&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77779&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77779&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77779&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77779&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77779&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77779&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77779&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77779&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77779&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77779&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77779&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77779&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77779&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77779&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77779&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77779&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77779&r=mysqlcfg