Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004483 [Quercus] minor always 04-06-11 10:34 04-06-11 10:57
Reporter tokeefe View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 4.0.11
  Product Build
Summary 0004483: Root-level namespace not working
Description The following PHP 5.3+ code is valid, and does not produce any errors when interpreted with mod_php5:

   namespace foo;

   function foo(\Exception $e) { }

The same code when interpreted by Quercus 4.0.11 produces the following error:

com.caucho.quercus.parser.QuercusParseException: index.php:2: namespace identifier is not allowed at '\Exception' in

This prevents certain code that targets PHP 5.3 from running without modification on both Quercus 4 and mod_php5.
Steps To Reproduce
Additional Information Apache HTTPD, PHP 5.3.3, and mod_php5 used in this example were installed through synaptic on Ubuntu 10.04 x86_64.
Attached Files

- Relationships

- Notes
04-06-11 10:57
edited on: 04-06-11 11:02

If it is of any help during debugging, it appears that I can only provoke this issue when using "\Exception" inside of a function signature.

For example, if you execute the following code, you will observe the issue when you uncomment the last line:

namespace foo;

class FooException extends \Exception { }

catch(\Exception $e)
        echo "Exception caught";

function throwException()
        throw new \Exception("Ouch");

if(new \Exception() instanceof \Exception);

//function foobar(\Exception $e) { }


- Issue History
Date Modified Username Field Change
04-06-11 10:34 tokeefe New Issue
04-06-11 10:57 tokeefe Note Added: 0005163
04-06-11 11:02 tokeefe Note Edited: 0005163

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker