ID: 34682
Updated by: [EMAIL PROTECTED]
Reported By: Adam dot Kirk at edu dot sait dot ca
-Status: Open
+Status: Bogus
Bug Type: Output Control
Operating System: Windows XP
PHP Version: 5.0.5
New Comment:
Sorry, but you're wrong. you should not use () with echo (and it's not
a function or method, it's a language construct).
Previous Comments:
------------------------------------------------------------------------
[2005-09-30 22:33:02] Adam dot Kirk at edu dot sait dot ca
As to my knowledge echo is a built in method (function) of php and per
object oriented standards all methods including print and echo use
parenthesis even in all the php 5 text books that I have seen use echo
("Name is ", $first); as consistant standard?
------------------------------------------------------------------------
[2005-09-29 18:06:54] [EMAIL PROTECTED]
Actual result is a parse error. echo is NOT a function.
This is the correct way:
echo "foo", $bar;
------------------------------------------------------------------------
[2005-09-29 18:00:47] Adam dot Kirk at edu dot sait dot ca
Description:
------------
When using the Echo to output text using a comma but inside the
parenthesis () the output doesnt work
Reproduce code:
---------------
<?PHP
$first = Adam;
echo("My Name is ", $first);
?>
Expected result:
----------------
My Name is Adam
Actual result:
--------------
actual results is blank screen
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34682&edit=1