cvs: phpdoc /en/reference/simplexml examples.xml
| From: | Jakub Vrana | Date: | Fri, 07 Nov 2008 11:01:00 +0000 |
| Subject: | cvs: phpdoc /en/reference/simplexml examples.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2427@lists.php.net to get a copy of this message | ||
vrana Fri Nov 7 11:01:00 2008 UTC
Modified files:
/phpdoc/en/reference/simplexml examples.xml
Log:
Two elements are different (bug #44411)
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/simplexml/examples.xml?r1=1.2&r2=1.3&diff_format=u
Index: phpdoc/en/reference/simplexml/examples.xml
diff -u phpdoc/en/reference/simplexml/examples.xml:1.2
phpdoc/en/reference/simplexml/examples.xml:1.3
--- phpdoc/en/reference/simplexml/examples.xml:1.2 Mon Dec 24 13:17:58 2007
+++ phpdoc/en/reference/simplexml/examples.xml Fri Nov 7 11:01:00 2008
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<chapter xml:id="simplexml.examples" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.examples;
@@ -169,6 +169,23 @@
</para>
<para>
<example>
+ <title>Comparing Two Elements</title>
+ <simpara>
+ Two SimpleXMLElements are considered different even if they point to the
+ same element since PHP 5.2.0.
+ </simpara>
+ <programlisting role="php"><![CDATA[
+<?php
+$el1 = new SimpleXMLElement($xmlstr);
+$el2 = new SimpleXMLElement($xmlstr);
+var_dump($el1 == $el2); // false since PHP 5.2.0
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ <example>
<title>Using XPath</title>
<simpara>
SimpleXML includes built-in <acronym>XPath</acronym> support.