From: michaelduff at yahoo dot com Operating system: PHP version: 5.4.6 Package: SimpleXML related Bug Type: Feature/Change Request Bug description:Please remove 'final' restriction on SimpleXMLElement::__construct
Description: ------------ The __construct() method on SimpleXMLElement is marked 'final', which prevents extension of the class for, say, XML-format-specific objects which augment otherwise empty incoming XML data. The current workaround is to use __get and __set and company (which unfortunately means <?= $obj instanceof SimpleXMLElement ?> fails), and which is much slower -- or to use a static factory method which forces some XML in there (which is syntactically ugly imo.) Not to shoot my request in the foot, but I forsee possible issues with these functions: - simplexml_import_dom ( $node [, $class_name ] ) - simplexml_load_file ( string $filename [, string $class_name ] ... ) - simplexml_load_string ( string $data [, string $class_name ] ... ) However, perhaps it would suffice to require 'a compatible function signature' rather than to mark it final? -- Edit bug report at https://bugs.php.net/bug.php?id=62858&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62858&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62858&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62858&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62858&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62858&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62858&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62858&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62858&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62858&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62858&r=support Expected behavior: https://bugs.php.net/fix.php?id=62858&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62858&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62858&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62858&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62858&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=62858&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62858&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62858&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62858&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62858&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62858&r=mysqlcfg