--TEST-- XMLReader::readOuterXml() doesn't reach hard limit --EXTENSIONS-- xmlreader --INI-- memory_limit=4M --FILE-- xxxxxxxx", 32768); fwrite($fp, ""); for ($i = 0; $i < 24; $i++) { fwrite($fp, $piece); } fwrite($fp, ""); unset($piece); fclose($fp); $reader = XMLReader::open($path); $reader->read(); $reader->readOuterXml(); echo "not reached\n"; ?> --CLEAN-- --EXPECTF-- Fatal error: Allowed memory size of 4194304 bytes exhausted %S(tried to allocate %d bytes) in %s on line %d