Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85648 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45769 invoked from network); 1 Apr 2015 18:46:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Apr 2015 18:46:18 -0000 Authentication-Results: pb1.pair.com header.from=dev@mabe.berlin; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dev@mabe.berlin; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mabe.berlin from 80.237.132.167 cause and error) X-PHP-List-Original-Sender: dev@mabe.berlin X-Host-Fingerprint: 80.237.132.167 wp160.webpack.hosteurope.de Received: from [80.237.132.167] ([80.237.132.167:49948] helo=wp160.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/04-21906-8FC3C155 for ; Wed, 01 Apr 2015 13:46:16 -0500 Received: from dslb-178-002-078-042.178.002.pools.vodafone-ip.de ([178.2.78.42] helo=[192.168.178.30]); authenticated by wp160.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) id 1YdNeX-00089H-Ho; Wed, 01 Apr 2015 20:46:13 +0200 Message-ID: <551C3CF5.5060704@mabe.berlin> Date: Wed, 01 Apr 2015 20:46:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: PHP internals Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;dev@mabe.berlin;1427913976;1fa3740d; Subject: Overwrite return type-hint into a more specific one From: dev@mabe.berlin (Marc Bennewitz) Hi internals, On experimenting with return type-hints I noted an inconsistency on overwriting an existing hint to a more specific one. On adding a non existing return type-hint on overwrite it's fine but it's logically the same (this previously was an E_STRICT). http://3v4l.org/YdB8s - works fine (E_STRICT lower then php7@20150401) http://3v4l.org/UDk0n - Fatal error: Declaration of Bar::setTest() must be compatible with Foo::setTest($test): Foo http://3v4l.org/AuOsr - HHVM works fine Marc