3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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;
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: simplexml_load_string(): Entity: line 5: parser error : Opening and ending tag mismatch: br line 4 and Text in /in/T5ACb on line 11 Warning: simplexml_load_string(): This is a second line of text.</Text> in /in/T5ACb on line 11 Warning: simplexml_load_string(): ^ in /in/T5ACb on line 11 Warning: simplexml_load_string(): Entity: line 6: parser error : Opening and ending tag mismatch: Text line 4 and Item in /in/T5ACb on line 11 Warning: simplexml_load_string(): </Item> in /in/T5ACb on line 11 Warning: simplexml_load_string(): ^ in /in/T5ACb on line 11 Warning: simplexml_load_string(): Entity: line 7: parser error : Opening and ending tag mismatch: Item line 2 and Test in /in/T5ACb on line 11 Warning: simplexml_load_string(): </Test> in /in/T5ACb on line 11 Warning: simplexml_load_string(): ^ in /in/T5ACb on line 11 Warning: simplexml_load_string(): Entity: line 7: parser error : Premature end of data in tag Test line 1 in /in/T5ACb on line 11 Warning: simplexml_load_string(): </Test> in /in/T5ACb on line 11 Warning: simplexml_load_string(): ^ in /in/T5ACb on line 11 Notice: Trying to get property of non-object in /in/T5ACb on line 13 Notice: Trying to get property of non-object in /in/T5ACb on line 13
Output for hhvm-3.10.0 - 3.12.0
Notice: Cannot access property on non-object in /in/T5ACb on line 13 Notice: Cannot access property on non-object in /in/T5ACb on line 13 Entity: line 5: parser error : Opening and ending tag mismatch: br line 4 and Text This is a second line of text.</Text> ^ Entity: line 6: parser error : Opening and ending tag mismatch: Text line 4 and Item </Item> ^ Entity: line 7: parser error : Opening and ending tag mismatch: Item line 2 and Test </Test> ^ Entity: line 7: parser error : Premature end of data in tag Test line 1 </Test> ^
Output for 5.0.0 - 5.0.5
Warning: Entity: line 5: parser error : Opening and ending tag mismatch: br line 4 and Text in /in/T5ACb on line 11 Warning: This is a second line of text.</Text> in /in/T5ACb on line 11 Warning: ^ in /in/T5ACb on line 11 Warning: Entity: line 6: parser error : Opening and ending tag mismatch: Text line 4 and Item in /in/T5ACb on line 11 Warning: </Item> in /in/T5ACb on line 11 Warning: ^ in /in/T5ACb on line 11 Warning: Entity: line 7: parser error : Opening and ending tag mismatch: Item line 2 and Test in /in/T5ACb on line 11 Warning: </Test> in /in/T5ACb on line 11 Warning: ^ in /in/T5ACb on line 11 Warning: Entity: line 7: parser error : Premature end of data in tag Test line 1 in /in/T5ACb on line 11 Warning: </Test> in /in/T5ACb on line 11 Warning: ^ in /in/T5ACb on line 11 Notice: Trying to get property of non-object in /in/T5ACb on line 13 Notice: Trying to get property of non-object in /in/T5ACb on line 13
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/T5ACb on line 11
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/T5ACb 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/T5ACb on line 11