Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49462 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7848 invoked from network); 19 Aug 2010 16:45:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2010 16:45:18 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.123 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.123 smtp123.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.123] ([67.192.241.123:47420] helo=smtp123.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AD/11-00261-D9F5D6C4 for ; Thu, 19 Aug 2010 12:45:17 -0400 Received: from relay22.relay.dfw.mlsrvr.com (localhost [127.0.0.1]) by relay22.relay.dfw.mlsrvr.com (SMTP Server) with ESMTP id 2FB26C08188; Thu, 19 Aug 2010 12:45:15 -0400 (EDT) Received: by relay22.relay.dfw.mlsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id E9FB4C08401; Thu, 19 Aug 2010 12:45:14 -0400 (EDT) Message-ID: <4C6D5F9A.4090200@sugarcrm.com> Date: Thu, 19 Aug 2010 09:45:14 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 MIME-Version: 1.0 To: Zeev Suraski CC: PHP Internals References: <4C6CE273.2070501@sugarcrm.com> <7.0.1.0.2.20100819180204.18df1cb0@zend.com> In-Reply-To: <7.0.1.0.2.20100819180204.18df1cb0@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] inheritance check too strict? From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > transparently, because they're specialized of ObjParent. If this > function signature was allowed - it can end up calling > ObjChild::set() with an argument - which ObjChild() doesn't support. But it does! It just silently ignores the argument - which it does not need. But you can add as much extra arguments as you want, they always were silently ignored. Also, ObjChild might use func_get_args, etc. to get the arguments. > The other way around - making ObjChild::set() more support more > signatures than the signature it's 'overriding' - makes perfect sense > and is allowed. But that's exactly what happens - ObjChild supports more signatures (inclusive!) than ObjParent. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227