From: Operating system: PHP version: Irrelevant Package: SimpleXML related Bug Type: Feature/Change Request Bug description:Context parameter for simplexml_load_file and SimpleXMLElement::__construct
Description: ------------ A lot of the file/stream accessing functions have a context parameter. In contrast, SimpleXMLElement::__construct() and simplexml_load_file() do not. Both are able to use other contexts though, since you can change the context in use using libxml_set_streams_context(). The problem with that is, that future requests using any of the other xml extensions are affected as well by using the function mentioned above. In the interest of a consistent interface and a minimized risk to break things, it would be nice to see a context parameter for the SimpleXMLElement::__construct() and simplexml_load_file(). Furthermore a hint in the manual entries for both functions to libxml_set_streams_context() or contexts in general would be good. I just spend a number of hours debugging my code, and the error turned out to be a missing context reset in a class from somebody else... :( -- Edit bug report at http://bugs.php.net/bug.php?id=53369&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53369&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53369&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53369&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53369&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53369&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53369&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53369&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53369&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53369&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53369&r=support Expected behavior: http://bugs.php.net/fix.php?id=53369&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53369&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53369&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53369&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53369&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53369&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53369&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53369&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53369&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53369&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53369&r=mysqlcfg