Re: Re: PHP 8: Method Overloading, The Ressurection

From: Date: Sun, 03 Feb 2019 21:21:40 +0000
Subject: Re: Re: PHP 8: Method Overloading, The Ressurection
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-104085@lists.php.net to get a copy of this message
Well there should be a: overload function sum(float $b, float $b): float; in that case or throw an error for no matching function available imho. On Sun, Feb 3, 2019 at 8:00 PM Christoph M. Becker <cmbecker69@gmx.de> wrote: > On 03.02.2019 at 19:39, David Rodrigues wrote: > > > overload function sum(int $a, int $b): int; > > overload function sum(float $b, float $b): float; > > Which function would sum(17.4, 42) call? Also consider: > > sum(PHP_INT_MAX, PHP_INT_MAX) > > vs. > > sum(PHP_INT_MAX+1, PHP_INT_MAX+1) > > -- > Christoph M. Becker > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- <http://wyrihaximus.net/> Website <http://wyrihaximus.net/?utm_source=signature&utm_medium=email&utm_campaign=emailsignature> | Blog <http://blog.wyrihaximus.net/?utm_source=signature&utm_medium=email&utm_campaign=emailsignature> | Github <https://github.com/WyriHaximus> | Linkedin <http://nl.linkedin.com/in/ceesjankiewiet> | Twitter <http://twitter.com/wyrihaximus> | Facebook <http://www.facebook.com/CeesJan.Kiewiet>

« previous php.internals (#104085) next »