PHP 8.5.0 Alpha 4 available for testing

Voting

: one minus zero?
(Example: nine)

The Note You're Voting On

Patanjali
4 years ago
Further to rmirabelle's comment, to compare two SimpleXML elements, do the comparison between the objects returned by the dom_import_simplexml function, as per:

<?php
if(dom_import_simplexml($simplexml_element_1)===dom_import_simplexml($simplexml_element_2)){
...
}
?>

You must ensure that both are SimpleXML elements before conversion to DOM objects.

<< Back to user notes page

To Top