3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $xml=simplexml_load_string(<<<XML <Server> <Host>74.208.165.122</Host> <Port>21</Port> <Protocol>0</Protocol> <Type>0</Type> <Logontype>1</Logontype> <User>u52405838</User> <Pass>ebrandz1</Pass> <TimezoneOffset>0</TimezoneOffset> <PasvMode>MODE_DEFAULT</PasvMode> <MaximumMultipleConnections>0</MaximumMultipleConnections> <EncodingType>Auto</EncodingType> <Comments></Comments> <LocalDir></LocalDir> <RemoteDir></RemoteDir>Zukara.com </Server> </Servers> XML ); foreach($xml->xpath('//product[starts-with(Host/text(),"Shirt")]') as $product) { echo $product->Host; echo "\n"; echo $product->User; echo "\n"; echo $product->Pass; echo "\n<br>"; }
Output for 7.0.0 - 7.1.0
Warning: simplexml_load_string(): Entity: line 17: parser error : Extra content at the end of the document in /in/NJCPS on line 19 Warning: simplexml_load_string(): </Servers> in /in/NJCPS on line 19 Warning: simplexml_load_string(): ^ in /in/NJCPS on line 19 Fatal error: Uncaught Error: Call to a member function xpath() on boolean in /in/NJCPS:22 Stack trace: #0 {main} thrown in /in/NJCPS on line 22
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Warning: simplexml_load_string(): Entity: line 17: parser error : Extra content at the end of the document in /in/NJCPS on line 21 Warning: simplexml_load_string(): </Servers> in /in/NJCPS on line 21 Warning: simplexml_load_string(): ^ in /in/NJCPS on line 21 Fatal error: Call to a member function xpath() on boolean in /in/NJCPS on line 22
Process exited with code 255.
Output for 5.1.0 - 5.1.1, 5.1.3 - 5.5.38
Warning: simplexml_load_string(): Entity: line 17: parser error : Extra content at the end of the document in /in/NJCPS on line 21 Warning: simplexml_load_string(): </Servers> in /in/NJCPS on line 21 Warning: simplexml_load_string(): ^ in /in/NJCPS on line 21 Fatal error: Call to a member function xpath() on a non-object in /in/NJCPS on line 22
Process exited with code 255.
Output for 5.1.2
Warning: simplexml_load_string(): Entity: line 17: parser error : Extra content at the end of the document in /in/NJCPS on line 22 Warning: simplexml_load_string(): </Servers> in /in/NJCPS on line 22 Warning: simplexml_load_string(): ^ in /in/NJCPS on line 22 Fatal error: Call to a member function xpath() on a non-object in /in/NJCPS on line 23
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: Entity: line 17: parser error : Extra content at the end of the document in /in/NJCPS on line 21 Warning: </Servers> in /in/NJCPS on line 21 Warning: ^ in /in/NJCPS on line 21 Fatal error: Call to a member function xpath() on a non-object in /in/NJCPS on line 22
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/NJCPS on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/NJCPS on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_string() in /in/NJCPS on line 2