Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49881 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51223 invoked from network); 7 Oct 2010 05:56:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2010 05:56:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=quickshiftin@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=quickshiftin@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: quickshiftin@gmail.com X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:41955] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/98-06116-5116DAC4 for ; Thu, 07 Oct 2010 01:56:39 -0400 Received: by fxm11 with SMTP id 11so174165fxm.29 for ; Wed, 06 Oct 2010 22:56:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=W25CRJPcc9t/Z2xGVkrLvpELl104qep9FnW8dezvgKk=; b=N534GCVBQky5iX9xCGBV59ZmfYz6+GLHiJm3KZCEzjmHxuvhn972wMqqEQD4dYWePe QjeBP5kK5UYxufD2pWfGptJrH/whFNlVHD+5xxORL68A42lx5+1lbSC4lovILDBHDo8H sbXH2fs/AVNPPr8PqBgfEOY/vmyBK0SfzD5KE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=OlYd+wZlUSZabcRCdKQSwKYwww6JQ28SVSv5edeXKht/xLg46DyjknJVYcsNIcavAo +/ixT9HGGBcT3bkWdCDm06NSqMlYUiC/omkI57L4QwwnBNBxXLQs9mCQJ0UgpsQbtoRj 6yEcn4SpGx6CqLENlMQUtwpNJxBa/66BC38qw= MIME-Version: 1.0 Received: by 10.239.173.68 with SMTP id d4mr12176hbf.162.1286430994433; Wed, 06 Oct 2010 22:56:34 -0700 (PDT) Received: by 10.239.189.135 with HTTP; Wed, 6 Oct 2010 22:56:34 -0700 (PDT) Date: Wed, 6 Oct 2010 23:56:34 -0600 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=001485f197ea7385fc0492008ee0 Subject: Using child classes/interfaces as desired type hints From: quickshiftin@gmail.com (Nathan Nobbe) --001485f197ea7385fc0492008ee0 Content-Type: text/plain; charset=UTF-8 Hi, Probly rehashing an old conversation here, but I'm wondering why the following isn't supported This results in a fatal Fatal error: Declaration of ConcreteClient::doStuff() must be compatible with that of AbstractClient::doStuff() in /Users/quickshiftin/gitRepos/timberline/php-api-v15-client/testOverride.php on line 11 I was reading a few posts from way back when http://marc.info/?t=107774904800001&r=1&w=2 yet still find myself wondering. I think it can be said here that if there's a contract defined by AbstractClient::doStuff, that same contract is honored by ConcreteClient::doStuff. I also think changing the language to support this notion wouldn't raise BC issues for the most part (at all?) since at the moment you're forced to move to the lowest common denominator in the tree, in this case class ConcreteClient extends AbstractClient { function doStuff(AbstractServer $o) {} } your feedback appreciated, -nathan --001485f197ea7385fc0492008ee0--