Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105123 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40264 invoked from network); 7 Apr 2019 00:19:39 -0000 Received: from unknown (HELO mail-lj1-f181.google.com) (209.85.208.181) by pb1.pair.com with SMTP; 7 Apr 2019 00:19:39 -0000 Received: by mail-lj1-f181.google.com with SMTP id f18so8017474lja.10 for ; Sat, 06 Apr 2019 14:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=duncanc-co-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=r9Zf1rCL5WWWSz3zwuyCVWtuGN5Cs4i7KZi/J0VL4RY=; b=IDCW5/iMue/Wde6JvB0Ek8JxljrP5reraNegSNl1bUdKw3lZ0buR7eJ9YWd/LY0BUm t8SStCC8DDWEXPZdC+zeCHgIufpc2kDUiXSwtm1xHTHqyBFNwWq5hE6b0BV78np967+J CyIm9KVXxA5UG2JrIXO6J5D9emwhZ0DYpT0VVF4afCTGnPh4zDHZR1NyoAkHmtzLQwJP BNp3LT0WjIOuAtdOqQc03GxpZHC1RednNlyjNqHcgKUDqbzzGztSCQgqT6XhGT2rle5O 85ZKS7DEUUlaqFNdyfxt5U5rerwX9KBQmTDq68xVVd9d+630US1DEerv9Y4izqrTasBT FznQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=r9Zf1rCL5WWWSz3zwuyCVWtuGN5Cs4i7KZi/J0VL4RY=; b=kQBz9Q2uSj4/hH/kmtaaJ1FboaElYC4tel9v0RkhO0Eq8QlDPK3Teto/xXUXrAvpny iYA5FGmGsfEQLkB87DphnzsiGa0vc2LT8R9mVO1Io9dPLMq1KbP+li4kQrgn0Tjzc8gI b/NVfMirE8lRjTQn/gEXCbj0ka7d8OZNIzwNNQo2KxlT8q+p4ky15KQSjaoerywiscUm 9HN3t9TKVIuR+5B+T73ZmFPfqTASRoOetirRDL6kX5TOOzcBR6ZAUTyMDK/D2f4wTUOn PYLlOOYucIUbAl25vi/77S/+h4vbfJ+Ar4YiJYUalZ6ex8HUboGZ1UHiBuYavg2QDpqO 60qg== X-Gm-Message-State: APjAAAU+xjP+YY2XbJ2vaF+gx9xL/3GiBUpOOKVIJZ2+KsWh2tuE0Xnt Vvhxa9JGbVh3gJu+i6yazAUJYuisO0s= X-Google-Smtp-Source: APXvYqw3qjas+FGgN2DasZp98RjPSM0xjJ+JrBByKRt/nVH9hXR0dw0/9Ex01mDiEtvKplCvRUrKfA== X-Received: by 2002:a2e:9597:: with SMTP id w23mr5220290ljh.111.1554585352428; Sat, 06 Apr 2019 14:15:52 -0700 (PDT) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com. [209.85.208.179]) by smtp.gmail.com with ESMTPSA id f18sm5445204lja.91.2019.04.06.14.15.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Apr 2019 14:15:51 -0700 (PDT) Received: by mail-lj1-f179.google.com with SMTP id f23so8084140ljc.0 for ; Sat, 06 Apr 2019 14:15:51 -0700 (PDT) X-Received: by 2002:a2e:128a:: with SMTP id 10mr10783046ljs.170.1554585350801; Sat, 06 Apr 2019 14:15:50 -0700 (PDT) MIME-Version: 1.0 Date: Sat, 6 Apr 2019 22:15:39 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Internals Content-Type: multipart/alternative; boundary="0000000000009ba36e0585e31bcc" Subject: Parameter skipping From: php@duncanc.co.uk (Craig Duncan) --0000000000009ba36e0585e31bcc Content-Type: text/plain; charset="UTF-8" Hi all, After starting to use https://wiki.php.net/rfc/json_throw_on_error in PHP 7.3 I've encountered the annoying issue of having to pass the $depth parameter as 512 every time I want json_decode() to throw. After doing this a few times I remembered the parameter skipping RFC that Stas proposed a few years ago: https://wiki.php.net/rfc/skipparams I've re-read the previous discussion and it seems to me there were two common arguments against: * Just design better APIs * Named parameters would be better Nobody has been able to crack named parameters (and it doesn't seem likely anytime soon), and as we've seen from the JSON example above it's not always as simple as having better APIs, so I wanted to see whether people would be willing to support the *default* keyword for optional parameters now. Thanks, Craig --0000000000009ba36e0585e31bcc--