ID: 42802 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Assigned +Status: Closed Bug Type: Scripting Engine problem Operating System: Linux 2.6.21 PHP Version: 5CVS-2007-09-30 (CVS) Assigned To: dmitry New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [2007-10-01 08:24:15] [EMAIL PROTECTED] Looks like a duplicate of http://bugs.php.net/bug.php?id=42798 to me. ------------------------------------------------------------------------ [2007-09-30 13:05:52] [EMAIL PROTECTED] I think the reporter is right and bar inside the declaration should resolve to foo::bar. And function(foo::bar $param) {} should be allowed, too. Dmitry please take a look, thanks. ------------------------------------------------------------------------ [2007-09-30 13:01:38] [EMAIL PROTECTED] Description: ------------ Namespaces are not supported in type hints. Type hints with namespace result in an "Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM". Reproduce code: --------------- <?php namespace foo; class bar {} class blubb { public function __construct( bar $bar ) {} } new blubb( new bar() ); Expected result: ---------------- No error. Actual result: -------------- Catchable fatal error: Argument 1 passed to foo::blubb::__construct( ) must be an instance of bar, instance of foo::bar given, called in ns_test.php on line 17 and defined in ns_test.php on line 11 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42802&edit=1