php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43027 Declare cause fatal error
Submitted: 2007-10-19 01:03 UTC Modified: 2007-11-01 11:59 UTC
From: felipensp at gmail dot com Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.3CVS-2007-10-19 (snap) OS: Linux
Private report: No CVE-ID: None
 [2007-10-19 01:03 UTC] felipensp at gmail dot com
Description:
------------
README.namespaces said "The namespace declaration statement must be the very first statement in
the file. The only exception is "declare" statement that can be used before." But, declare statement cause fatal error.

Reproduce code:
---------------
<?php
declare(ticks=1);
namespace test;

Expected result:
----------------
No error.

Actual result:
--------------
Fatal error: Namespace declaration statement has to be the very first statement

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-19 08:30 UTC] johannes@php.net
Dmitry, please have a look.
 [2007-11-01 11:59 UTC] dmitry@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 22 13:00:02 2025 UTC