|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-04-02 12:49 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 11:00:01 2025 UTC |
Echo and parenthesis have nothing to do with each other. You can write echo("Foo") in the same way you're allowed to write echo(((((((((("Foo")))))))))). Both are equally pointless. The correct echo syntax is `echo "Foo"`.