Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42151 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9737 invoked from network); 8 Dec 2008 15:50:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Dec 2008 15:50:59 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.116 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.116 us-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [63.205.162.116] ([63.205.162.116:58351] helo=us-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/54-21579-2624D394 for ; Mon, 08 Dec 2008 10:50:59 -0500 Received: from [10.1.2.44] ([10.1.2.44]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 8 Dec 2008 07:51:18 -0800 Message-ID: <493D425C.6010104@zend.com> Date: Mon, 08 Dec 2008 17:50:52 +0200 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Karsten Dambekalns CC: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 08 Dec 2008 15:51:19.0078 (UTC) FILETIME=[CF855C60:01C9594C] Subject: Re: [PHP-DEV] Problem with (namespaced) code extending ReflectionProperty - possible bug? From: stas@zend.com (Stanislav Malyshev) Hi! > According to the manual and the PHP source the signature is this: > public function getValue(stdclass $object) Manual is unfortunately not exact in this point - true signature for it is public function getValue([object $object]) - i.e. $object is not required and if it's supplied, it doesn't have to be stdclass - any object will do. Thus, engine correctly complains that your signature - required object of stdclass - is not compatible. > > This is my test code: > ---- snip ---- > class PropertyReflection extends ReflectionProperty { > public function getValue(stdclass $object) {} > } > ?> Use public function getValue($object = null) {} instead. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com