|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-10-16 16:34 UTC] felipe@php.net
-Status: Open
+Status: Verified
[2010-10-16 16:34 UTC] felipe@php.net
[2010-10-16 17:07 UTC] felipe@php.net
[2010-10-16 17:09 UTC] felipe@php.net
-Summary: unexp. warning with abstract static methods used
inside namespace/required file
+Summary: unexp. warning with abstract static methods used
inside another file
-Package: Class/Object related
+Package: Scripting Engine problem
[2010-10-16 17:21 UTC] felipe@php.net
-Status: Verified
+Status: Bogus
[2010-10-16 17:22 UTC] felipe@php.net
[2010-10-17 02:24 UTC] cmanley at xs4all dot nl
[2010-10-17 02:45 UTC] giorgio dot liscio at email dot it
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 17 08:00:01 2025 UTC |
Description: ------------ without namespace works perfectly: <?php // index.php ini_set("display_errors", true); ini_set("error_reporting", E_ALL | E_STRICT); abstract class AbstractFileSystemItem { abstract static function ensurePathIsValid($fullPath); } class Dir extends AbstractFileSystemItem { static function ensurePathIsValid($fullPath){} } ?> -------------------------------------------------------- with namespace and require: (test the two files) gives unexpected warning Static function AbstractFileSystemItem::ensurePathIsValid() should not be abstract <?php // index.php (run this) ini_set("display_errors", true); ini_set("error_reporting", E_ALL | E_STRICT); require("FSNuovo/Directory.php"); ?> <?php // FSNuovo/Directory.php namespace FSNuovo; abstract class AbstractFileSystemItem { abstract static function ensurePathIsValid($fullPath); } class Dir extends AbstractFileSystemItem { static function ensurePathIsValid($fullPath){} } ?> original discussion: http://bugs.php.net/bug.php?id=53081