You are here: abstract static methods? « PHP Programming Language « IT news, forums, messages
abstract static methods?

Posted by Mads Lee Jensen on 09/26/07 18:07

Hello..
Was wondering shouldn't an abstract static method cause a E_STRICT ?

this is my test.

error_reporting(E_STRICT);
abstract class Test_Abstract
{
protected abstract static function testStatic();
}

class Child extends Test_Abstract
{
protected static function testStatic()
{
echo 'what';
}
}
$test = new Child();

or how should i read this

"Due to an oversight, PHP 5.0.x and 5.1.x allowed abstract static
functions in classes. As of PHP 5.2.x, only interfaces can have them."

http://php.oregonstate.edu/manual/en/migration52.incompatible.php

im running 5.2.2

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация