主页
PHP
PHP SimpleXML valid() 函数
demo_func_simplexml_valid
运行 ❯
×
更改方向
保存代码
更改主题
<?php $note=<<
Tove
Jani
Reminder
Do not forget me this weekend! XML; $xml = new SimpleXMLIterator($note); // rewind to the first element $xml->rewind(); // check if valid var_dump($xml->valid()); // move to the next element $xml->next(); // check if valid var_dump($xml->valid()); ?>