Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104085 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 27777 invoked from network); 4 Feb 2019 00:41:09 -0000 Received: from unknown (HELO mail-ot1-f52.google.com) (209.85.210.52) by pb1.pair.com with SMTP; 4 Feb 2019 00:41:09 -0000 Received: by mail-ot1-f52.google.com with SMTP id a11so10527444otr.10 for ; Sun, 03 Feb 2019 13:21:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J/sB8JYkHd92IDZaYIDLmC6IWmRJFBpqSbNRnOY3ifE=; b=gfane6JXGba0Dv4K4YE9KwDq4JdwHIyPK+NNa8WCgHRNwhTzum5RdMPZwMWjtzvOTI 1N/PXTup4XSHoO2xoslQnG8jswLb6Bejbj4vnZRGE5Q/IQ2O+1Avc81IS7vkuzFNSxe5 W4ChwjBVU1pHqcPqOxKDpfQv+fGQRcwWEKFoY3Gnp6mO+U3eZQ5Sl7dtpxN//TeeBrte wQSlmq98Npq/u4+1tLD1LvKwp3ORX1ibz4zgz0HGlI0m69qyeveIIBY5zVGKrNIvHtrL kFIp05XSr/JblfonulmkCoo1xkwCQ+5kE64T8HUyy8PTx6l06ykA+dKCrgYFc4fRU+Iz BrMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=J/sB8JYkHd92IDZaYIDLmC6IWmRJFBpqSbNRnOY3ifE=; b=GvYwA7frF59Et+KJhds+hYgee4gYa1rD0SeR+Ymq2r0JSZaqDQw7kV1vmVNN/zc971 VyuiY34I9TdUp7q6CpYYJfVhf0nWSNlwBofZ4rubblI0z4uJOaG586jXiSqQ0NRcus8Z YPC5hbFaIz0OfDaDDH9/lFCiV7vvEsuvoG/VMtkFGmfsGIJi9HVOId9EhRPtobJp6Yu+ fbaRTXxkMT6CHsMzfuEvMGpx0enHV9TcwGdRz5qq76jKoTpjNYcOSvVNEYRNGJaS9dPm ebMyJl/b70rgaDlwYJzrPSB5z0UxTrYa80Jxt5DVa3YxRE2dm82zT7U5qaMZRkWw2CzV VnhA== X-Gm-Message-State: AJcUukd1JqXEot11fyWaSDj7AjKoBsXt0RyOgW9qQFUsiGmTkJ5D23o7 Ij6uzx8WjfTfR6iVi182Bu19Q1n0DkIbh0ESxV8= X-Google-Smtp-Source: ALg8bN4Ou5I7jt2AdgRaCU2fqTMwZAlY3fBa40XDTz3j71XVrP6/jeQQkTp3AKlIjRInhV1BERY84R0fCO5SPaMhxJ0= X-Received: by 2002:a9d:1ea7:: with SMTP id n36mr34401451otn.217.1549228912486; Sun, 03 Feb 2019 13:21:52 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 3 Feb 2019 22:21:40 +0100 Message-ID: To: "Christoph M. Becker" Cc: David Rodrigues , PHP Internals Content-Type: multipart/alternative; boundary="000000000000012e8b058103f745" Subject: Re: [PHP-DEV] Re: PHP 8: Method Overloading, The Ressurection From: ceesjank@gmail.com (Cees-Jan Kiewiet) --000000000000012e8b058103f745 Content-Type: text/plain; charset="UTF-8" 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 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 > > -- Website | Blog | Github | Linkedin | Twitter | Facebook --000000000000012e8b058103f745--