Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68675 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92430 invoked from network); 29 Aug 2013 09:33:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Aug 2013 09:33:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.42 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.219.42 mail-oa0-f42.google.com Received: from [209.85.219.42] ([209.85.219.42:39949] helo=mail-oa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/80-23883-8651F125 for ; Thu, 29 Aug 2013 05:33:28 -0400 Received: by mail-oa0-f42.google.com with SMTP id j10so175566oah.29 for ; Thu, 29 Aug 2013 02:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=2BGi4yM0k62IgM/f84DW/IHozzz2oVOiUu3rNaoDU04=; b=UKUNNdsyEKyNWwTzmy1kqYgIYVSmbSBIWy5d/0gv4kU/GEV5dHG+oFDamnsEnreck5 m9kCCDcATDcFjxwbbRG/CttgzWrFvpXT3PjkqQEaWQuc1yKU9b3UcsgxgJXnbZcRL6uX dSYKANsLbkSsOX9d/AycL9Fx+OUvGtikgHtSX/4uudvoUe7mYMky0mapiMHDMU9OQ99x WrgLx4x5/+i6IYRIkB4nnU5oSXSFHvgyWBWyh3cB5xVRR7bJZ86+vX51ndC1rK6pxdXF dGLocu0RDRoZjFaV1z7/kZ3moC9z7/8v8Q4jUxIp3m5N/XyTCy3QZxwSTi9nlSt38W70 hiSw== MIME-Version: 1.0 X-Received: by 10.182.148.8 with SMTP id to8mr1801472obb.17.1377768804939; Thu, 29 Aug 2013 02:33:24 -0700 (PDT) Received: by 10.182.98.8 with HTTP; Thu, 29 Aug 2013 02:33:24 -0700 (PDT) Date: Thu, 29 Aug 2013 11:33:24 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=089e0139fc76337e8a04e512cc7f Subject: Signature compatibility: Number of arguments From: nikita.ppv@gmail.com (Nikita Popov) --089e0139fc76337e8a04e512cc7f Content-Type: text/plain; charset=ISO-8859-1 Hi internals! This is a spinoff from the variadics thread. Quoting Stas: > I also think this: > public function query($query, ...$params) > public function query(...$params) > should be legal too. This is a general issue in PHP that we might want to fix: Currently a method A is not compatible with a method B if A has less arguments than B. E.g. both of the following are incompatible signatures: public function foo($bar) public function foo() public function foo($bar = NULL) public function foo() This doesn't really make sense. Removing parameters doesn't violate LSP, because in PHP it is legal to pass more arguments than declared. (Only adding additional required parameters would violate LSP.) Is it okay to change this? Thanks, Nikita --089e0139fc76337e8a04e512cc7f--