|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-18 12:14 UTC] sander at snapworks dot nl
[2007-04-18 12:15 UTC] tony2001@php.net
[2007-04-18 12:26 UTC] sander at snapworks dot nl
[2007-04-18 12:42 UTC] tony2001@php.net
[2007-04-18 13:23 UTC] sander at snapworks dot nl
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 16:00:02 2025 UTC |
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