3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $response = '<?xml version="1.0" encoding="utf-8"?> <PostResponse><Status>success</Status><Price>10.00</Price><Message>Test successful.</Message><ConfirmationId>6</ConfirmationId></PostResponse>'; $xmlResponse = new SimpleXMLElement($response); $errorCode = $xmlResponse->Status; var_dump($errorCode);
Output for 5.0.0 - 7.1.0
object(SimpleXMLElement)#2 (1) { [0]=> string(7) "success" }
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: simplexmlelement in /in/lPUTH on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: simplexmlelement in /in/lPUTH on line 6