Am 28.05.2017 um 23:28 schrieb Dan Ackroyd:
On 28 May 2017 at 18:06, Aidan Woods <aidantwo...@gmail.com> wrote:
So, if I understand everything here correctly
...
will be equivalent in 7.2? :(
Not equivalent. Adding the Boo param type to an implementation, when
it is only a comment in the parent gives an error.
interface Foo
{
/*
* @param $Boo, pretty please accept type Boo here
*/
public function bar( $Boo);
}
class Zot implements Foo {
public function bar(Boo $Boo) {}
}
Fatal error: Declaration of Zot::bar(Boo $Boo) must be compatible with
Foo::bar($Boo) in %s on line %d
all these things should be just warnings instead fatal errors no matter
if we talk about params or return-types simply because any sane code
over years had types in the doc-block comments and now with throw fatal
errors you just make it only harder move that comment hints to code
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php