<?php
$xmlstr = <<<XML
<?xml version='1.0' standalone='yes'?>
<movies>
<movie>
<title>PHP: Behind the Parser</title>
<characters>
<character>
<name>Ms. Coder</name>
<actor>Onlivia Actora</actor>
</character>
<character>
<name>Mr. Coder</name>
<actor>El ActÓr</actor>
</character>
</characters>
<plot>
So, this language. It's like, a programming language. Or is it a
scripting language? All is revealed in this thrilling horror spoof
of a documentary.
</plot>
<great-lines>
<line>PHP solves all my web problems</line>
</great-lines>
<rating type="thumbs">7</rating>
<rating type="stars">5</rating>
</movie>
</movies>
XML;
$parsed = simplexml_load_string($xml);
$foo = isset($parsed->movies->movie->foo->bar->baz);
var_dump($foo);
?>
Warning: Undefined variable $xml in /in/kbPA5 on line 30
Deprecated: simplexml_load_string(): Passing null to parameter #1 ($data) of type string is deprecated in /in/kbPA5 on line 30
bool(false)
Output for 8.0.0 - 8.0.30
Warning: Undefined variable $xml in /in/kbPA5 on line 30
bool(false)
Notice: Undefined variable: xml in /in/kbPA5 on line 30
Notice: Trying to get property of non-object in /in/kbPA5 on line 32
Notice: Trying to get property of non-object in /in/kbPA5 on line 32
Notice: Trying to get property of non-object in /in/kbPA5 on line 32
Notice: Trying to get property of non-object in /in/kbPA5 on line 32
bool(false)
Output for 5.1.2
Notice: Undefined variable: xml in /in/kbPA5 on line 31
Notice: Trying to get property of non-object in /in/kbPA5 on line 33
Notice: Trying to get property of non-object in /in/kbPA5 on line 33
Notice: Trying to get property of non-object in /in/kbPA5 on line 33
Notice: Trying to get property of non-object in /in/kbPA5 on line 33
bool(false)
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: xml in /in/kbPA5 on line 30
Notice: Trying to get property of non-object in /in/kbPA5 on line 32
Notice: Trying to get property of non-object in /in/kbPA5 on line 32
Notice: Trying to get property of non-object in /in/kbPA5 on line 32
Notice: Trying to get property of non-object in /in/kbPA5 on line 32
bool(false)
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/kbPA5 on line 30
Process exited with code 255.