mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Add new test
This commit is contained in:
26
tests/classes/interface_and_extends.phpt
Executable file
26
tests/classes/interface_and_extends.phpt
Executable file
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
ZE2 a class cannot extend an interface
|
||||
--SKIPIF--
|
||||
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface Test
|
||||
{
|
||||
function show();
|
||||
}
|
||||
|
||||
class Tester extends Test
|
||||
{
|
||||
function show() {
|
||||
echo __METHOD__ . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
$o = new Tester;
|
||||
$o->show();
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Fatal error: Class Tester cannot extend from interfac Test in %sinterface_and_extends.php on line %d
|
||||
Reference in New Issue
Block a user