Bug #74363 [Opn->Nab]: echo doesn't accept multiple arguments
| From: | dm@php.net | Date: | Sun, 02 Apr 2017 13:01:39 +0000 |
| Subject: | Bug #74363 [Opn->Nab]: echo doesn't accept multiple arguments | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-208282@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74363&edit=1
ID: 74363
Updated by: dm@php.net
Reported by: olafvdspek at gmail dot com
Summary: echo doesn't accept multiple arguments
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Debian
PHP Version: 5.6.30
Block user comment: N
Private report: N
New Comment:
Not a bug, explained in manual as you've later realized.
Previous Comments:
------------------------------------------------------------------------
[2017-04-02 12:53:22] olafvdspek at gmail dot com
Grr, this seems to simple to be true.
> Additionally, if you want to pass more than one parameter to echo, the parameters must not be
> enclosed within parentheses.
> void echo ( string $arg1 [, string $... ] )
Perhaps this should be split into two lines, one without parentheses and with multiple arguments and
one with parentheses and a single argument.
Or multiple arguments should be supported in both forms..
------------------------------------------------------------------------
[2017-04-02 12:49:30] olafvdspek at gmail dot com
Description:
------------
Echo doesn't appear to accept multiple arguments
PHP 5.6.30-0+deb8u1 (cli) (built: Feb 8 2017 08:50:21)
PHP 7.0.16-3 (cli) (built: Feb 22 2017 10:03:06) ( NTS )
Test script:
---------------
<?php
echo('A', 'B');
Expected result:
----------------
AB
Actual result:
--------------
PHP Parse error: syntax error, unexpected ',' in /root/a.php on line 2
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74363&edit=1