ID:               41129
 User updated by:  sander at snapworks dot nl
-Summary:          static method in interface
 Reported By:      sander at snapworks dot nl
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: linux 2.6.20-1.2944.fc6
 PHP Version:      5.2.2RC1
 New Comment:

- more descriptive summary


Previous Comments:
------------------------------------------------------------------------

[2007-04-18 12:10:20] sander at snapworks dot nl

Description:
------------
PHP doesn't allow static methods in interfaces to have a body.


Reproduce code:
---------------
<?php
interface SomeInterface {
        static public function doSomething() {
        }
}
?>

Expected result:
----------------
A blank page indicating non-failure :) Static methods in interfaces
definitely should be allowed to have a body. Maybe it's not a common
practise, but it's at times convenient.


Actual result:
--------------
Fatal error: Interface function SomeInterface::doSomething() cannot
contain body in /var/www/html/workspace/test.php on line 4



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41129&edit=1

Reply via email to