« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 1 of about 1 for functionString (0.001 sec.)
DOMXPath::registerPhpFunctions — PHP の関数を XPath 関数として登録する | PHP 8.... 9414
DOMXPath::registerPhpFunctions (PHP 5 >= 5.3.0, PHP 7, PHP 8) DOMXPath::registerPhpFunctions — PHP の関数を XPath 関数として登録する 説明 public function DOMXPath::registerPhpFunctions ( string | array | null $restrict = null ): void このメ ... > <book> <title>XML basics</title> <author>Joe Black</author> </book> </books> 例2 DOMXPath::registerPHPFunctions() と php:functionString の例 <?php $doc = new DOMDocument ; $doc -> load ( 'examples/book-simple.xml' ); $xpath = new DOMXPath ( $doc ); // 名前空 ... 制限) $xpath -> registerPhpFunctions (); // substr 関数を book の title に適用します $nodes = $xpath -> query ( '//book[php:functionString("substr", title, 0, 3) = "PHP"]' ); echo "Found { $nodes -> length } books starting with 'PHP':\n" ; foreach ( $nodes as $ ...
https://man.mtool.work/php/8.3/domxpath.registerphpfunctions.html
PREV 1 NEXT