|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-07-02 23:05 UTC] scottmac@php.net
[2008-07-03 08:13 UTC] pajoye@php.net
[2008-07-11 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
Description: ------------ Creation of new xmlwriter using memory fails. Script stops at same line. In Apache error log notice is writen: [notice] child pid 363 exit signal Bus error (10) Reproduce code: --------------- $data = array( "foo" => 456, "bar" => 789, "aaa" => array( "abc" => 111 ) ); $xml = new XmlWriter(); $xml->openMemory(); // script stopes in this line $xml->startDocument('1.0', 'UTF-8'); $xml->startElement('root'); function write(XMLWriter $xml, $data){ foreach($data as $key => $value){ if(is_array($value)){ $xml->startElement($key); write($xml, $value); $xml->endElement(); continue; } $xml->writeElement($key, $value); } } write($xml, $data); $xml->endElement(); echo $xml->outputMemory(true); Expected result: ---------------- <?xml version="1.0" encoding="UTF-8"?> <root><foo>456</foo><bar>789</bar><aaa><abc>111</abc></aaa></root> Actual result: -------------- Blank Screen