3v4l.org

run code in 200+ php & hhvm versions
<?php $foo = simplexml_load_string("<foo><bar>aa</bar>\n</foo>"); var_dump((bool) $foo->bar[0]); var_dump((string) $foo->bar[0]);
Output for 5.0.0 - 5.3.29, 5.5.27 - 5.5.35, 5.6.11 - 7.3.1
bool(true) string(2) "aa"
Output for 5.4.0 - 5.5.26, 5.6.8 - 5.6.10
bool(false) string(2) "aa"
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/bUncK on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/bUncK on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_string() in /in/bUncK on line 3