Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111879 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 85355 invoked from network); 17 Sep 2020 13:54:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Sep 2020 13:54:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AFC261804E3 for ; Thu, 17 Sep 2020 06:03:19 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 ; Thu, 17 Sep 2020 06:03:19 -0700 (PDT) Received: by mail-ej1-f54.google.com with SMTP id nw23so3171184ejb.4 for ; Thu, 17 Sep 2020 06:03:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wSG8CT0a0Pv0v4Rke88ZohspE1GDO/f7d1oCZxo5bMs=; b=mN/udY+aj0DJw/6Fa8I++OfUNLmV1DrrN2rkEqZlvAVzWqE94GIptNolbqTfdQT3bV Hs+BRn4K9H/sFvw2+LK40Rxu9+XABQBzfwiiE2kx5ljMAXwFiX3mtsHzgiCnQ2F0D7jT l6Ud+OrwoYXhFEdlicEZ0Zd8UDjPfKbGnS9CuWpQcJ4CUCrMXLd7+Wqnl38zuSuINsxi /YzlkGkUyokRbRwENOJqUk8+ReiNEQkoCZoIL55ht4CvgeB3P5avva28BDITxb1Qip47 vNKfuj8+GF1wCr3guMRhBVslQ/IdIpHpTgf3FASCDBw0nulye//OKPcVoN+Iknro0Ynu uHyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wSG8CT0a0Pv0v4Rke88ZohspE1GDO/f7d1oCZxo5bMs=; b=dKwUMbwO03N7yVdhkSdzcPDPRnaX0+ZsYxxE/GLLL7vOiMBSXr2r48fdqhpXbca7G1 NGKJvGoQL0c7YQ9x03OIjR8P91WZIAUj+2k1vShZZK3UtFEAchSTkZ2I5wTzfAsr5mLW iNbYyVy/VulZpx/KSND4UwkvUV9xlq/QUuzuHwYE3Jht56X/IwKFd65m5oiGpIJIb6Bj yATPnBVQNHKNpDV3gLFkYZUTGxYYoRGMiD7sPTpV0N0c9A4SBpIq5YFufyTa6hgX+rnt Yzsd3rB9nj1Hm7Zv2piIoFXBA7KDwoUoRANZYLOUZQIWOMViWrn5qeTyucmSnylFmxEW VuZw== X-Gm-Message-State: AOAM531DzPg1JWexXXGZnlxfaSJp3NjHCvGQJStQuMqqXiDswrDiQqo7 iuOkWKKyHjB6kqJ6OE30EcUe29Ddl+Ti8C53eDyzZci8b4mrMA== X-Google-Smtp-Source: ABdhPJxxQwbF0zgzNmTkJ9P/+UOWlp/iDMPFW8txLum1Nb3qRcsDj6GrmnC9zAruC9b6OhLuKSGakdochKVvkixB7WQ= X-Received: by 2002:a17:907:2168:: with SMTP id rl8mr30390487ejb.308.1600347797119; Thu, 17 Sep 2020 06:03:17 -0700 (PDT) MIME-Version: 1.0 References: <20200917145304.4a6cfe45@mcmic-probook.opensides.be> In-Reply-To: <20200917145304.4a6cfe45@mcmic-probook.opensides.be> Date: Thu, 17 Sep 2020 15:03:05 +0200 Message-ID: To: =?UTF-8?Q?C=C3=B4me_Chilliet?= Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000f6e63605af82013f" Subject: Re: [PHP-DEV] Stubs in ext/ldap From: george.banyard@gmail.com ("G. P. B.") --000000000000f6e63605af82013f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 17 Sep 2020 at 14:53, C=C3=B4me Chilliet < come.chilliet@fusiondirectory.org> wrote: > Hello, > > After playing with phpstan and seeing their stubs for some LDAP functions > were > wrong, I noticed that documentation for LDAP functions and stubs in > ext/ldap/ldap.stub.php differs. > A lot of the documentation is not up to date and will needs to be updated after there has been a check of the argument names for consistency with other extensions in regards to named params, the stubs are the source of trust. > Especially in a lot of functions, the documentation states "string $dn = =3D > NULL" > but the stub states non-nullable string parameter. Also, the ldap.stub.p= hp > file contains a lot of "string $bind_rdn =3D UNKNOWN" in places where th= e > documentations states =3D NULL. What does UNKOWN mean here? > UNKNOWN means that the default value cannot be specified due to some reason mostly the case for arguments passed by references or funcky function signature implementation which check the number of argument passed to the function. > I would like to fix those conflicts. > Basically my questions are: > 1) What is the difference between s and S in zend_parse_parameters and ho= w > do > they behave for a NULL value? > None in regards to userland as 's' is a char* followed by a size_t ad 'S' is a zend_string. As for all internal functions which are not nullable they will coerce null to the respective type so for a string argument null would become an empty string. > 2) What would changing =3D UNKNOWN to =3D NULL impact? Explicit support for nullable types in the C implementation > 3) When a function like ldap_bind is called, is calling ldap_bind($link), > and > ldap_bind($link, NULL) changing anything else than ZEND_NUM_ARGS? > This relates to point 1 and 2 above, if there is no support for nullable types passing null can change the meaning of it. C=C3=B4me > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > Hope this answers most of the questions Best regards George P. Banyard --000000000000f6e63605af82013f--