Edit report at http://bugs.php.net/bug.php?id=53081&edit=1
ID: 53081
Comment by: giorgio dot liscio at email dot it
Reported by: giorgio dot liscio at email dot it
Summary: why you should bring back abstract static methods
Status: Bogus
Type: Feature/Change Request
Package: Class/Object related
PHP Version: 5.3.3
Block user comment: N
New Comment:
Strict Standards: Static function cA::B() should not be abstract in
..\www\index.php on line 6
5.3.3
Previous Comments:
------------------------------------------------------------------------
[2010-10-16 19:42:48] rasmus@php.net
Which strict warning do you get? I don't see one.
------------------------------------------------------------------------
[2010-10-16 19:39:13] giorgio dot liscio at email dot it
so, felipe says that is not a bug and hes right
rasmus you say that this code is correct, but i still get a strict
warning
abstract class cA {
static function A(){static::B();}
abstract static function B();
}
class cB extends cA {
static function B(){echo "ok";}
}
cB::A();
------------------------------------------------------------------------
[2010-10-16 09:37:51] giorgio dot liscio at email dot it
no more a change request
http://bugs.php.net/bug.php?id=53082
bug reported
thank you Rasmus!
------------------------------------------------------------------------
[2010-10-16 09:27:47] giorgio dot liscio at email dot it
ok it is a php bug, it is related to files and namespaces...
if you put this in global space works (no error triggered)
<?php
// index.php
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){}
}
?>
------------------------------------------------------------------------
[2010-10-16 09:01:34] giorgio dot liscio at email dot it
i'm investigating about my error
Static function FSItem::ensurePathIsValid() should not be abstract
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=53081--
Edit this bug report at http://bugs.php.net/bug.php?id=53081&edit=1