php-src/tests/classes/abstract_static.phpt

37 lines
728 B
Plaintext
Raw Normal View History

--TEST--
2006-07-17 10:08:17 +00:00
ZE2 A static abstract methods
--FILE--
<?php
2006-05-10 21:19:37 +00:00
interface showable
{
static function show();
}
2006-05-10 21:19:37 +00:00
class pass implements showable
{
static function show() {
echo "Call to function show()\n";
}
}
pass::show();
2006-05-10 21:19:37 +00:00
eval('
class fail
{
abstract static function func();
}
');
fail::show();
echo "Done\n"; // shouldn't be displayed
?>
--EXPECTF--
Call to function show()
Strict Standards: Static function fail::func() should not be abstract in %stests/classes/abstract_static.php(%d) : eval()'d code on line %d
Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (fail::func) in %s/tests/classes/abstract_static.php(%d) : eval()'d code on line %d