Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105489 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 62646 invoked from network); 29 Apr 2019 02:04:03 -0000 Received: from unknown (HELO mail-wm1-f51.google.com) (209.85.128.51) by pb1.pair.com with SMTP; 29 Apr 2019 02:04:03 -0000 Received: by mail-wm1-f51.google.com with SMTP id o25so11356412wmf.5 for ; Sun, 28 Apr 2019 16:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=6/lgBPkIwUq+BlCEA2gkP6y0sMM4hdgcXogn/4HFWko=; b=kwAvPy3atA98MIXxvvLYmPj7aAMs/wM572u3TH/VA4sbgNcrprZghR4N4s9RYNCcD9 yUlG4sFY1FjmthruifXGnN1UFbLePCKP7qyRlBEeiNLt5HbMdA+M7Q+/Pjg+kcQjFqYk b0ONfVXCUJ2iWOrBkQorNsagzRs2R6rev1AseI5xkZeQvDkXvdRGpNAxKEhu1aG/VXH7 9eFLpSRkNapO+Wno/L0fhgXVY6Fe7LTIFiOJoTAgdkDfs40E+e9Mc7DTejrWSY700tT/ k/SOpHbOFDPpAcg6VXbLM7BLk2e8HuR9WRVj1eOa7+rjrrEe9x9I4nyBgvI/+xma+ORc lqzQ== 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=6/lgBPkIwUq+BlCEA2gkP6y0sMM4hdgcXogn/4HFWko=; b=bGOOWClNjwa3hAQEsUKkk6DzIUbko45HY8EyN71MNDXZyrrG9ao4c/hA17I6PlV2ve EX2r/+TaEmwUGB+11LAsUNuYk5irNPjkdrXaycUvFAjgrqao9PjsWkfmcHgxQ/S3cELp VxpaUaoXPKB0CBXVLwpT+aiRWlQMKXOfN3jy1S9dkgfH+ONWoZFTHn3m+8vx4AFTF0yS wQeIJ5hrY5+60gQ0HGntx1ddB8plygUL7mEkU77dEk/li0gC70B6gbJCcNs7xUy+x5jd Q9wFuXQC6mxSPEunXDJdSo0cDxAFelkLxP52qBvdMnVwqHQ4qenxDNX1GwbDbLLcvmJj 5/UA== X-Gm-Message-State: APjAAAUANTAGYmfvhgzhm0dbCr5y2bWl+tJysBGSoPNKXJCiljvlQcZx efg4C7Vcofmav7MFw4igEVcAV9H4PgnC8/9iY+cLTySEJzs= X-Google-Smtp-Source: APXvYqzKfqAFByVDW/1M3+qgRTePlVUm20V3cWxPn9Zx6i1qaCpmmdlN+p42MFw0zitB2AFgVIhH06d94Atwz7ZcCiU= X-Received: by 2002:a1c:43c2:: with SMTP id q185mr15672940wma.53.1556492747471; Sun, 28 Apr 2019 16:05:47 -0700 (PDT) MIME-Version: 1.0 Date: Sun, 28 Apr 2019 20:05:36 -0300 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary="0000000000004f034005879f3586" Subject: Don't silence chr function arguments error From: carusogabriel34@gmail.com (Gabriel Caruso) --0000000000004f034005879f3586 Content-Type: text/plain; charset="UTF-8" Hello Internals. I'd like to discuss a small change, but that demands a discussion, for a function in PHP's Core: https://php.net/chr . Currently, if you pass an argument that is not an integer, it will simply return an empty string: https://3v4l.org/FF2nA. In case you pass more than 1 argument, it will complain about "Wrong number of arguments": https://3v4l.org/Yrr43. The proposal of https://github.com/php/php-src/pull/4080 is to relly these checks to ZPP, making the first argument mandatory to an integer, and make the error message for extra arguments consistent with the rest of the core functions, e.g. "Warning: chr() expects parameter 1 to be int, string given". The idea is to merge in PHP-7.4, but if there's a consensus that this should go into PHP 8 only, so it is :) Best, -- Gabriel Caruso --0000000000004f034005879f3586--