Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95308 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17866 invoked from network); 19 Aug 2016 13:05:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2016 13:05:24 -0000 Authentication-Results: pb1.pair.com header.from=me@daveyshafik.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@daveyshafik.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain daveyshafik.com from 209.85.218.46 cause and error) X-PHP-List-Original-Sender: me@daveyshafik.com X-Host-Fingerprint: 209.85.218.46 mail-oi0-f46.google.com Received: from [209.85.218.46] ([209.85.218.46:35662] helo=mail-oi0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BC/2F-17996-31407B75 for ; Fri, 19 Aug 2016 09:05:23 -0400 Received: by mail-oi0-f46.google.com with SMTP id 4so62403292oih.2 for ; Fri, 19 Aug 2016 06:05:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daveyshafik-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:from:date:message-id:subject:to; bh=Eh71xpLWm/4iBSSoWnesI1gJ3rHuAnHQ5YAE2dVEIr8=; b=pfumxOwyta9jgmCsYFYFQrkjZiOqAJBkYZYLfDPxt6NTbtVy1dMWg3ACRCmzjmFn7+ s1o6y1zHJoMEgMeG80/S/1P9oRxo/0VP1VYdw8Dqwq4F/aU9f1+ZeYgRi9dd3lE3Hia1 i0H08r9SF6meaxT+RXI0LPrjj9FOBk5ITBegzdfV5aruqit/+GrgEKnJUKJYNshafp09 jlmR59b6laDSyBcheY00VIPw7gW7gQy/ThpqhHSE0y/gP4P3A+ex+06oVX/HbIZZ7B3x 0Ph5qDTMrXPCpHJ5h2ErCM0su1nppK+UwNFFfrxeSww8TuA9UKCt16fgO5UPpfiwwWT/ BdHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=Eh71xpLWm/4iBSSoWnesI1gJ3rHuAnHQ5YAE2dVEIr8=; b=S8Lwvjsk2SJiBt8XURqy+oJu9yl7NHNb2rIE/OrC3fMEI4y9aK9sXNz6OYyYY6idyV m3wDZ54Of8t7l7Vr5E3hOXlzw7qMK9MuHSoDEIEHIATlHi/k40D4yB9xPynUArA/glyl J6M70aUSq3cJ1NyKN70QRYECHT+VYdew+VqFWoI+MIwyBU3Y9Fnk3L55oOhXvrAFCXAy m5Fd/8mWYPnibVDQ3Acna0zlk6R8FmC20SV3Ifd8XUhLc1SLIzFsU3NSQq1t8ag+8mP5 /1TIdUONETqDZ18US+38l7SW64Mr8KlfvYuwTDKjj6+5vQT15zP6GoLhvEKwwzlca/vw JyqA== X-Gm-Message-State: AEkoousvxtfKLpThIUQkHzUNibPc/GIfUrGa3aeR99efXygN+rrG2U9p4I8ia3SEZuAdK9AC/mV6ot2R2vIcaOQF X-Received: by 10.157.44.10 with SMTP id f10mr4452848otb.13.1471611920466; Fri, 19 Aug 2016 06:05:20 -0700 (PDT) MIME-Version: 1.0 Sender: me@daveyshafik.com Received: by 10.182.40.136 with HTTP; Fri, 19 Aug 2016 06:05:19 -0700 (PDT) Date: Fri, 19 Aug 2016 23:05:19 +1000 X-Google-Sender-Auth: OIpCl0KjvFImfN_rWP8LLzmPpQI Message-ID: To: "internals@lists.php.net" , Dmitry Stogov Content-Type: multipart/alternative; boundary=94eb2c033cf2c462b0053a6c5954 Subject: Incorrect Argument Count Error From: davey@php.net (Davey Shafik) --94eb2c033cf2c462b0053a6c5954 Content-Type: text/plain; charset=UTF-8 Hey Internals, I'm working on the patch to change the error exception to \ArgumentCountError instead of \Error when too few, or too many arguments are passed in as discussed a couple of weeks ago. To be BC with 7.0, this extends \TypeError, which is the exception currently thrown when strict_types=1 for both userland and internal functions. I've run into an issue where things are inconsistent for internal functions. For example, the array_* functions, like array_diff, still have a warning thrown, regardless of strict_types: php_error_docref(NULL, E_WARNING, "at least %d parameters are required, %d given", req_args, ZEND_NUM_ARGS()); It seems that fixing this will be: a) a mammoth task b) a huge BC break (stuff that currently throws a warning in strict_types mode will now throw an exception, similar BC break as we're implementing for userland functions regardless of strict_types) c) something we should have done for 7.0, and that we cannot change now. We are currently heading in 7.1.0RC1 in two weeks, and I want this issue resolved in its entirety before then. What say you, internals? - Davey --94eb2c033cf2c462b0053a6c5954--