Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121655 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99314 invoked from network); 11 Nov 2023 15:32:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Nov 2023 15:32:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B88F4180087 for ; Sat, 11 Nov 2023 07:32:39 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 11 Nov 2023 07:32:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1699716757; bh=yDqYDzzknRDcJzhwxktZdPMjIWwk2OjYG2T0JkhsoME=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=Xk/WRzYeXIltB6YhMgztJrOVugEtuOSc+CKTcTzOhmy+Sk8eyinRMqWrMMgaxdctP W37PBo+qkL1cvYTm9tVYh/KlLeK3rXQsAn39/mYKqvF+ZFGsLRTvJGpMW3qng8Ceen yx7jBI7HAZDh0o1SNyq6A79xKef8kbXyb0AOiMpYDuOc1b0HjOYthUTpxsWXfRb0z5 aIhVm0Mr1yyivWJgckswn/IQ30Ay45DL3pBx1li+xuGzCV+MOcUyXFWxNSNAOijTJT zRHQrKUnLAqyUlyBsl+TMumxmyfhgUsb7k/4KQC8fmgPzIeaoeXL8YZyWdJqlcOLqz ua0Of2oFxquXg== Message-ID: <722a3c38-fa29-4cff-94e6-f965cec55a11@bastelstu.be> Date: Sat, 11 Nov 2023 16:32:35 +0100 MIME-Version: 1.0 To: Niels Dossche , PHP internals References: <04ba672f-33e1-4aae-aac4-7ad55dbc21de@gmail.com> Content-Language: en-US In-Reply-To: <04ba672f-33e1-4aae-aac4-7ad55dbc21de@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] [Discussion] Improve callbacks in ext/dom and ext/xsl From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 11/7/23 20:32, Niels Dossche wrote: > I'm opening the discussion for my RFC "Improve callbacks in ext/dom and ext/xsl". > RFC link: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl Some question that I believe are not answered: 1. $xpath->registerPhpFunctions([ "foo" => ... ]); $xpath->registerPhpFunctions([ "foo" => ... ]); Is this an error due to the duplicate definition or will the last 'foo' win? 2. $xpath->registerPhpFunctions([]); Is this an error or a noop? 3. Would it make sense to deprecate passing a string as "Future Scope"? Simplifying the method signature would also allow to simplify the documentation in the long run and registering a string is trivially fixed by adding square brackets. In fact looking at the existing documentation at https://www.php.net/manual/en/domxpath.registerphpfunctions.php, what's the difference between 'php:function()' and 'php:functionString()'? Best regards Tim Düsterhus