From:             vivekanandan8 at yahoo dot com
Operating system: debian linux 
PHP version:      5.3.0beta1
PHP Bug Type:     *Programming Data Structures
Bug description:  After defining namespace using curly brace, we can't have any 
statement then

Description:
------------
when defining the namespace using the curly brace,no statement can't be
accepted after the end of namespace,hence we are forced to use in the
separate include file.
where as other format of defining namespace like 
namsespace a; works fine.


Reproduce code:
---------------
<?php

namespace nsUserInfo {
const vRole = 'user';
}

print "Expected Result :". \nsUserInfo\vRole;

?>


Expected result:
----------------
Expected Result :user

Actual result:
--------------
Fatal error: No code may exist outside of namespace {} in
/usr/local/apache/htdocs/php/nstest.php on line 7

-- 
Edit bug report at http://bugs.php.net/?id=47379&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=47379&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=47379&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=47379&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=47379&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47379&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=47379&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=47379&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=47379&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=47379&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=47379&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=47379&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=47379&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=47379&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=47379&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47379&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47379&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=47379&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=47379&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=47379&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=47379&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=47379&r=mysqlcfg

Reply via email to