Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117180 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 91259 invoked from network); 1 Mar 2022 15:07:55 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Mar 2022 15:07:55 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7325518050B for ; Tue, 1 Mar 2022 08:29:11 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 1 Mar 2022 08:29:11 -0800 (PST) Received: by mail-lj1-f182.google.com with SMTP id t14so22540411ljh.8 for ; Tue, 01 Mar 2022 08:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xmCwgrZ01S+23atQiwFRBPmHsTjGlE56AHzFFRKRgHk=; b=gVS2SDkU6KfVjiSuJKsbjm+UP3V+1pBVYsvmW2Xrqqhctghm1HW2p8yHuX4D1hdXS+ 064iUxBE5R9M5Dchy+poxgXIKUqB0pZ5G5JLWU1pxKVlThR1fohpSR8bvdXXEcOXkuhZ FyoQyyW3HSZodtY4JbcrIbeej0GqrVD0HHiW8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xmCwgrZ01S+23atQiwFRBPmHsTjGlE56AHzFFRKRgHk=; b=AoF3gVDsdUEN5GhCEsr7Hdi63sca6aXmDCjhfxKy8UPbdKl9Sdk5LS+19ttaophWhE 2fmpsGZQ7uc7yCekqvZtY2HKVEgL0zPlV9lt1NGUSLh7+UiG0gXSMHRtzSUkSddJFn/J 2MfNK/0L98bqhQ2pc1Y8dAfdD5HE4YmgRgFaTO2Wlh0kOybDT+OkSKLA9w+emVF43lze 7f/CcYYgrFavbjKAC7i3oeKrJR1YgUFB510caAXA2iI6T7443TBiujdtQYxG17QHYCMs OlfXVCqJkUXhk+IbHMXNJpABlylxoRH65qvX1xvtz3R9b4Xpuu3KcwY15ZkWU1sAJP5V bA/g== X-Gm-Message-State: AOAM533BjCnd1DeTpUOaWo0/y3BIQXIhomn39APXoSUFBZEjXBsSDw33 nUy3EA3T7rl1SUiOe1Tcr52dDUaP6j9Rsvp80bfsKmsbR0a9YIuR X-Google-Smtp-Source: ABdhPJy1CEHEcXGfczhs/xd0SVI4dhqkoQRqg3tKlt+vZzM+lSJjklrbIHfumoWORb7O8+FaELb6v6DBvaT8PACoLdk= X-Received: by 2002:a2e:bc11:0:b0:246:609b:8843 with SMTP id b17-20020a2ebc11000000b00246609b8843mr12886958ljf.27.1646152149293; Tue, 01 Mar 2022 08:29:09 -0800 (PST) MIME-Version: 1.0 References: <983552d8-11f1-b5bc-fb82-148347982fda@gmx.de> <5494eaa7-2fa6-8364-9683-a2c8c9789d81@gmail.com> <69642616-72b7-44fe-97a7-27ae03bc8fce@www.fastmail.com> <7fbed755-42e2-d023-285f-39863a97f297@gmx.de> <3665C848-B4C3-4528-AEFA-02C868748AA8@cschneid.com> <0b5bc29d-3814-0e1d-b94a-47790019c778@gmx.de> <5463E9FF-309D-4CFA-B709-81498B934059@cschneid.com> In-Reply-To: <5463E9FF-309D-4CFA-B709-81498B934059@cschneid.com> Date: Tue, 1 Mar 2022 16:28:58 +0000 Message-ID: To: Christian Schneider Cc: php internals Content-Type: multipart/alternative; boundary="0000000000001aef0805d92aaa90" Subject: Re: [PHP-DEV] Allowing NULL for some internal functions From: craig@craigfrancis.co.uk (Craig Francis) --0000000000001aef0805d92aaa90 Content-Type: text/plain; charset="UTF-8" On Tue, 1 Mar 2022 at 13:06, Christian Schneider wrote: > The other way of making internal functions behave like user land functions > would be to change the definition of the internal function to > function htmlentities(?string $value) { ... } > and casting it to string internally which would make the > definition/documentation/behavior consistent while staying backward > compatible. > True, that is an option, and that's where I started... but I changed my mind, because developers who use `strict_types=1` can use this extra meta data (the type check) to verify their code is working as expected. In other words, someone checking types can see NULL being passed to functions like escapeshellarg() as an error, and I do not want to break that for them. Craig --0000000000001aef0805d92aaa90--