1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Adding tests for abstract static methods

This commit is contained in:
Marcus Boerger
2003-03-03 11:13:56 +00:00
parent 326b793faf
commit 447da280dd

View File

@@ -0,0 +1,26 @@
--TEST--
A static abstrcat method may not be called
--SKIPIF--
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class fail {
abstract static function show();
}
class pass extends fail {
static function show() {
echo "Call to function show()\n";
}
}
pass::show();
fail::show();
echo "Done\n"; // shouldn't be displayed
?>
--EXPECTF--
Call to function show()
Fatal error: Cannot call abstract method fail::show() in %s on line %d