Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29907 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80197 invoked by uid 1010); 29 May 2007 23:06:21 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 80182 invoked from network); 29 May 2007 23:06:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 May 2007 23:06:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=pstradomski@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pstradomski@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 66.249.92.173 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pstradomski@gmail.com X-Host-Fingerprint: 66.249.92.173 ug-out-1314.google.com Linux 2.4/2.6 Received: from [66.249.92.173] ([66.249.92.173:62622] helo=ug-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 71/8B-10662-BE1BC564 for ; Tue, 29 May 2007 19:06:20 -0400 Received: by ug-out-1314.google.com with SMTP id m2so52928uge for ; Tue, 29 May 2007 16:06:16 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:reply-to:to:subject:date:user-agent:references:in-reply-to:mime-version:content-disposition:message-id:content-type:content-transfer-encoding; b=PFUmjNwrdxWLPBX/Do46Gkt2o9obRWsDCSVZa+qIBN2omYrpUWQX3n1FiJrZuEqNMiNWZ7nFD7rfSqHXByGISzvKWJIy3M8AF2FVFBEPaPCuZvXASbRJ0s6Hm04Lv5OPYOUhN7uRUWsHL/ldKXXFDO3t2A9jo57eR52Nhvc4AkI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:reply-to:to:subject:date:user-agent:references:in-reply-to:mime-version:content-disposition:message-id:content-type:content-transfer-encoding; b=QQVjRYKFol9/ovVaGYPP/bxrbNQYsSwde0ZXAUdmGa+UmUietosTRwfX4XVF+JNbWOfxWz3FxxG4jQuJ5Sa7jQ0z/gqu509GGbhVoXElW2BPl33dceWoRAtOYxeTm9Tv3ETZfiMbBVAWM9umMg6bEFhcHtG1BNP7EJPcJrwY438= Received: by 10.67.99.1 with SMTP id b1mr115539ugm.1180479976407; Tue, 29 May 2007 16:06:16 -0700 (PDT) Received: from deimos ( [195.136.196.130]) by mx.google.com with ESMTP id e34sm254325ugd.2007.05.29.16.06.14; Tue, 29 May 2007 16:06:15 -0700 (PDT) Reply-To: =?iso-8859-2?q?Pawe=B3_Stradomski?= To: internals@lists.php.net Date: Wed, 30 May 2007 01:06:02 +0200 User-Agent: KMail/1.9.7 References: <57.79.10662.276AC564@pb1.pair.com> In-Reply-To: <57.79.10662.276AC564@pb1.pair.com> MIME-Version: 1.0 Content-Disposition: inline Message-ID: <200705300106.02315.pstradomski@gmail.com> Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] function overriding and class inheritance From: pstradomski@gmail.com (=?iso-8859-2?q?Pawe=B3_Stradomski?=) Emil Ivanov wrote: > class C1 {} > class C2 extends C1 {} > > abstract class Work1 { > =A0public function f1(C1 $c); > } > > class Work2 extends Work1 { > =A0public function f1(C2 $c); > } Strange thing is I don't get any error message here, although there definit= ely=20 should be one. PHP 5.2.2-pl1-gentoo (cli) (built: May 21 2007 12:36:57) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies And regarding your code - it should work the other way round - you can only= =20 loose preconditions and tighten postconditions, which is a result of=20 substituion rule already mentioned by Stanislav. =2D-=20 Pawe=B3 Stradomski