This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 126301

Summary: PHP editor reports errors on correct PHP code (NewExpression)
Product: php Reporter: Petr Pisl <ppisl>
Component: CodeAssignee: Denis Anisimov <ads>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 126072    

Description Petr Pisl 2008-01-30 16:31:57 UTC
The valid PHP code is:

$class = "Block_$type";
$proto = new $class;
Comment 1 Petr Pisl 2008-01-30 16:44:40 UTC
The fix could be in the purePHP5.nbs file:

-NewExpression = "new" <php_identifier> [ Arguments ] ;
+NewExpression = "new" (<php_identifier> | Expression) [ Arguments ] ;
Comment 2 Petr Pisl 2008-03-27 10:54:46 UTC
Fixed in the new editor.