Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68676 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96625 invoked from network); 29 Aug 2013 10:53:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Aug 2013 10:53:26 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.53 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.219.53 mail-oa0-f53.google.com Received: from [209.85.219.53] ([209.85.219.53:39876] helo=mail-oa0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/31-23883-5282F125 for ; Thu, 29 Aug 2013 06:53:26 -0400 Received: by mail-oa0-f53.google.com with SMTP id k18so318153oag.12 for ; Thu, 29 Aug 2013 03:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=el0SGwq8riA0y1VestlDSnmM+JTSz/lTTDDfEOiz9fQ=; b=CNkzO6fMKc8emfyI29UfRN8usTJ6BghzD4e1A2QNIZxcZPraQcT4e9+mQbe6p2xXbh 1Gw5tR4p/XX78I2C8NSoRd73jUjkBT/g/gxKcTRDS5qgAJBcL+azAQdpAfrUxpidWOiE 6OZw4uElDmDH60pOtqCo9KJ1veC40gh7HI7IF8KkJcbx+6/xRx/BtX+o1Y9pbW/d7yck BWZwF0QbYgqBGFWKmvHDC7imTh/PNIWBofo6AMeIkuwRUJxZsvt/PGar0ZW3AiEfsZTY Ua3uu9IC9EF6Pwy62P+45XbtcdlpC5BobJ07m8gIiRkwMLypCIW+O3dg+hXKsZpth+5l Qs9A== MIME-Version: 1.0 X-Received: by 10.182.186.97 with SMTP id fj1mr1511695obc.53.1377773603232; Thu, 29 Aug 2013 03:53:23 -0700 (PDT) Received: by 10.182.98.8 with HTTP; Thu, 29 Aug 2013 03:53:23 -0700 (PDT) In-Reply-To: References: Date: Thu, 29 Aug 2013 12:53:23 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=089e0149383233a4a904e513ea18 Subject: Re: Signature compatibility: Number of arguments From: nikita.ppv@gmail.com (Nikita Popov) --089e0149383233a4a904e513ea18 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Aug 29, 2013 at 11:33 AM, Nikita Popov wrote: > 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 > Patch for this change: https://github.com/php/php-src/pull/424 Nikita --089e0149383233a4a904e513ea18--