php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53910 Allow semicolon on ending curly brackets!
Submitted: 2011-02-02 14:26 UTC Modified: 2011-02-04 11:58 UTC
From: jwge at gmx dot net Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 5.3.5 OS: all
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jwge at gmx dot net
New email:
PHP Version: OS:

 

 [2011-02-02 14:26 UTC] jwge at gmx dot net
Description:
------------
Doing things stringently, i do close all Statements with a semicolon, which works everywhere as far I exoerienced.

But using namespace statements with curly brackets, this produces an error:

Fatal error:  No code may exist outside of namespace {} in [test] on line 4

Test script:
---------------
namespace X{

};

namespace Y{
}

Expected result:
----------------
allow semicolon after curly bracket for namespace statements


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-04 11:58 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2011-02-04 11:58 UTC] aharvey@php.net
No code -- even blank statements -- can exist outside of the namespace
blocks if using the bracketed syntax. Our parser is complex enough
without adding another corner case.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 06:01:30 2024 UTC