ID: 44484 Updated by: [EMAIL PROTECTED] Reported By: jochem dot blok at fasterforward dot nl -Status: Assigned +Status: Closed Bug Type: SimpleXML related Operating System: Windows XP SP2 PHP Version: 5.2.5 Assigned To: colder New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2008-03-19 17:39:15] jochem dot blok at fasterforward dot nl Description: ------------ The call to magic function __toString() gives a Fatal error. This method should exists, see the reply of [EMAIL PROTECTED] at http://bugs.php.net/bug.php?id=25640 Reproduce code: --------------- <?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; $xml = new SimpleXMLElement($xmlstr); $m = $xml->movie[0]->plot; // "So this language. It's like..." $m->__toString() ?> Expected result: ---------------- 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. Actual result: -------------- Fatal error: Call to undefined method SimpleXMLElement::__toString() in C:\php\xml.php on line 35 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44484&edit=1