ID: 43332 Updated by: [EMAIL PROTECTED] Reported By: felipensp at gmail dot com -Status: Assigned +Status: Closed Bug Type: Scripting Engine problem PHP Version: 5.3CVS-2007-11-19 (snap) 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-11-24 12:32:37] [EMAIL PROTECTED] Another namespace issue. ------------------------------------------------------------------------ [2007-11-19 11:40:02] felipensp at gmail dot com Description: ------------ self and parent as type hint in namespace must be prefixed with '::', but not is possible to use them as class name. So, i'm guessing that shouldn't be necessary the prefix. Reproduce code: --------------- <?php namespace foobar; class foo { // no namespace //public function baz(self $a) { } // with namespace public function baz(::self $a) { } } $foo = new foo; $foo->baz($foo); // Ok! //$foo->baz(new stdclass); // Error, ok! Expected result: ---------------- Don't be necessary prefix in self/parent. Actual result: -------------- They must be prefixed. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43332&edit=1