|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-11-14 14:06 UTC] laruence@php.net
-Status: Open
+Status: Bogus
[2011-11-14 14:06 UTC] laruence@php.net
[2011-11-14 14:32 UTC] miracle at rpz dot name
-Type: Bug
+Type: Documentation Problem
[2011-11-14 14:32 UTC] miracle at rpz dot name
[2011-11-14 15:18 UTC] rquadling@php.net
[2011-11-14 15:18 UTC] rquadling@php.net
-Status: Bogus
+Status: Closed
-Assigned To:
+Assigned To: rquadling
[2011-11-14 15:21 UTC] rquadling@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
Description: ------------ Extended class compatible if declared in same file and "not compatible" if included from external script. Test script: --------------- <?php error_reporting(E_STRICT); class PassTest extends SimpleXMLElement { public function addAttribute($name, $value, $namespace = null) { } // no strict error here } $failtest = tempnam(sys_get_temp_dir(), 'failtest-'); file_put_contents($failtest,'<?php class FailTest extends SimpleXMLElement { public function addAttribute($name, $value, $namespace = null) { } } '); // save save class declaration to file include $failtest; // PHP Strict standards: Declaration of FailTest::addAttribute() should be compatible with that of SimpleXMLElement::addAttribute() in /tmp/failtest.php on line 5 Expected result: ---------------- [empty] Actual result: -------------- PHP Strict standards: Declaration of FailTest::addAttribute() should be compatible with that of SimpleXMLElement::addAttribute() in /tmp/failtest-Ma1kNH on line 4 PHP Stack trace: PHP 1. {main}() /tmp/simplexml-extend-strict-error.php:0