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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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: Sat Apr 20 02:01:29 2024 UTC