Re: DOMXPath / XSLTProcessor function callbacks

From: Date: Sat, 14 Oct 2023 11:54:59 +0000
Subject: Re: DOMXPath / XSLTProcessor function callbacks
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-121308@lists.php.net to get a copy of this message
Hi Tim On 10/14/23 12:30, Tim Düsterhus wrote: > Hi > > On 10/13/23 00:39, Niels Dossche wrote: >> Please let me know your thoughts. > > What does calling ->registerPHPFunctions() do when it's called more than once? Will the > existing allow-list be overwritten or amended? > > i.e. > > $xpath->registerPHPFunctions([ >   'strtoupper', > ]); > $xpath->registerPHPFunctions([ >   'ucfirst', > ]); > > will I be able to: > > (a) Call ucfirst(), but not strtoupper() > (b) Call both You can call both, it's additive. > > Best regards > Tim Düsterhus Cheers Niels

« previous php.internals (#121308) next »