- Code: Select all
$xml = simplexml_load_string("<a>
<b>
<c>text</c>
<c>stuff</c>
</b>
<d>
<c>code</c>
</d>
</a>");
echo '<pre>';
print_r($xml->xpath('/a/b'));
die;
from command line (e.g. $ /Applications/XAMPP/xamppfiles/bin/php file.php) everything will pass ok, but if you try to access this file from browser, PHP will crash without explanation. How can I avoid this (is anybody else met this too)?