php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54523 echo fatal error
Submitted: 2011-04-13 16:00 UTC Modified: 2013-12-06 07:24 UTC
From: kiminoumm at hotmail dot fr Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 5.2.17 OS: WIN NT5.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kiminoumm at hotmail dot fr
New email:
PHP Version: OS:

 

 [2011-04-13 16:00 UTC] kiminoumm at hotmail dot fr
Description:
------------
I just migrate my script to an old php version (4.3.5) to an newest, and now i get an fatal error when i use the echo function without parameter

Test script:
---------------
echo ;

Expected result:
----------------
a blank thing

Actual result:
--------------
an Fatal error

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-13 16:37 UTC] johannes@php.net
Not sure when/why this broke. You're mentioning 5.2, so it can't be our change from flex to re2c for the scanner. Anyways:

I can see that there are cases where allowing this makes sense. simple example might be a templating system generating code, something like this:

fwrite($file, 'echo '.implode(', ', $texts).';');

On the other hand I don't like having this case in the language ...
 [2013-12-06 07:24 UTC] mike@php.net
-Status: Open +Status: Wont fix
 [2013-12-06 07:24 UTC] mike@php.net
If our semantics were bash-like, I'd see it's usefulness.
 [2013-12-06 16:22 UTC] tyrael@php.net
for the record, this was changed in 5.0:
http://3v4l.org/5HAoe
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 08:01:31 2025 UTC