- var_dump: documentation ( source)
- ini_set: documentation ( source)
- error_reporting: documentation ( source)
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
$xml = new XMLReader();
$xml->XML('<html
<head><title>411 Length Required</title></head>
<body bgcolor="white">
<center><h1>411 Length Required</h1></center>
<hr><center>nginx</center>
</body>
</html>', null, LIBXML_ERR_ERROR);
// You must to use it
$xml->setParserProperty(XMLReader::VALIDATE, true);
var_dump($xml->isValid());