Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77299 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11770 invoked from network); 17 Sep 2014 17:10:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Sep 2014 17:10:55 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.173 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.173 mail-wi0-f173.google.com Received: from [209.85.212.173] ([209.85.212.173:52861] helo=mail-wi0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/F8-57031-E90C9145 for ; Wed, 17 Sep 2014 13:10:55 -0400 Received: by mail-wi0-f173.google.com with SMTP id em10so1658816wid.0 for ; Wed, 17 Sep 2014 10:10:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=A9lpZ8vLQsXWqKXcD24qWf56pF0RSGYT3crbpOPPbWw=; b=JLNIggQ2e/0ZHLP+P7HxB9q9MNrLATi2FYeMASCwz6a/IeoQ6ZiALfO17YgkV5ShJh rG+NPlxaBV6W4wbfkMkBwkYA0HNwoBBNOeeF+yjEattjkLTdN8Ai2e0q8ErVMwhW0cyl xb3syJE0yhBxvYrwAk0ngrjgp9zn3G+1fQbdd0NNbtQ42VJ45bYmRPfP6d2UVH+VrL/H 17BSb8AdfIGvNteH2C6gEzX14LqKVNjzFZY2B7tVIf1jk6lhPyvNIyn0lEfYPBKbEt79 rrzPWzHTiRsWkbHqJ2bDjrsdwJhdwIv9MYqQE4/YyB/pJcvMM0PNftqi5lw4goxBzPoG ONSA== X-Received: by 10.180.211.76 with SMTP id na12mr4257703wic.55.1410973851884; Wed, 17 Sep 2014 10:10:51 -0700 (PDT) Received: from [192.168.0.177] ([62.189.198.114]) by mx.google.com with ESMTPSA id f3sm6290723wiz.18.2014.09.17.10.10.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Sep 2014 10:10:51 -0700 (PDT) Message-ID: <5419C098.3010500@gmail.com> Date: Wed, 17 Sep 2014 18:10:48 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <4ED7146272E04A47B986ED49E771E347BBF1BAF541@Ikarus.ameusgmbh.intern> In-Reply-To: <4ED7146272E04A47B986ED49E771E347BBF1BAF541@Ikarus.ameusgmbh.intern> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Implementing interface method with child class in parameter def (Bug #42330) From: rowan.collins@gmail.com (Rowan Collins) Christian Stoller wrote (on 17/09/2014): > I'd say that it is absolutely legal to define a more specialized > type in a child or implementing class, or would this have any bad > side effects? Here is a StackOverflow question discussing exactly this issue, which includes why you can't do that with an interface contract, and some suggestions on what you might want to do instead: http://stackoverflow.com/q/21665795/157957 -- Rowan Collins [IMSoP]