<?php
$xml='<?xml version="1.0" encoding="UTF-8" ?>';
$xml.='<Test>
<Item>
<Price>0.53</Price>
<Text>This is some test text. We need to see how it does.<br>
This is a second line of text.</Text>
</Item>
</Test>';
$result=simplexml_load_string($xml);
echo $result->Item->Text;
Warning: simplexml_load_string(): Entity: line 4: parser error : EntityRef: expecting ';' in /in/JEVs2 on line 11
Warning: simplexml_load_string(): <Text>This is some test text. We need to see how it does.<br> in /in/JEVs2 on line 11
Warning: simplexml_load_string(): ^ in /in/JEVs2 on line 11
Warning: Attempt to read property "Item" on false in /in/JEVs2 on line 13
Warning: Attempt to read property "Text" on null in /in/JEVs2 on line 13
Warning: simplexml_load_string(): Entity: line 4: parser error : EntityRef: expecting ';' in /in/JEVs2 on line 11
Warning: simplexml_load_string(): <Text>This is some test text. We need to see how it does.<br> in /in/JEVs2 on line 11
Warning: simplexml_load_string(): ^ in /in/JEVs2 on line 11
Warning: Attempt to read property "Item" on bool in /in/JEVs2 on line 13
Warning: Attempt to read property "Text" on null in /in/JEVs2 on line 13
Warning: simplexml_load_string(): Entity: line 4: parser error : EntityRef: expecting ';' in /in/JEVs2 on line 11
Warning: simplexml_load_string(): <Text>This is some test text. We need to see how it does.<br> in /in/JEVs2 on line 11
Warning: simplexml_load_string(): ^ in /in/JEVs2 on line 11
Notice: Trying to get property 'Item' of non-object in /in/JEVs2 on line 13
Notice: Trying to get property 'Text' of non-object in /in/JEVs2 on line 13
Output for 7.3.32 - 7.3.33
Warning: simplexml_load_string(): Entity: line 4: parser error : EntityRef: expecting ';' in /in/JEVs2 on line 11
Warning: simplexml_load_string(): <Text>This is some test text. We need to see how it does.<br> in /in/JEVs2 on line 11
Warning: simplexml_load_string(): ^ in /in/JEVs2 on line 11
Warning: simplexml_load_string(): Entity: line 4: parser error : EntityRef: expecting ';' in /in/JEVs2 on line 11
Warning: simplexml_load_string(): <Text>This is some test text. We need to see how it does.<br> in /in/JEVs2 on line 11
Warning: simplexml_load_string(): ^ in /in/JEVs2 on line 11
Notice: Trying to get property of non-object in /in/JEVs2 on line 13
Notice: Trying to get property of non-object in /in/JEVs2 on line 13
Output for 5.0.0 - 5.0.5
Warning: Entity: line 4: parser error : EntityRef: expecting ';' in /in/JEVs2 on line 11
Warning: <Text>This is some test text. We need to see how it does.<br> in /in/JEVs2 on line 11
Warning: ^ in /in/JEVs2 on line 11
Notice: Trying to get property of non-object in /in/JEVs2 on line 13
Notice: Trying to get property of non-object in /in/JEVs2 on line 13
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/JEVs2 on line 11
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/JEVs2 on line 11
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_string() in /in/JEVs2 on line 11