2003-03-07 23:56:31 +08:00
--TEST--
ZE2 interface with an unimplemented method
--FILE--
<?php
2015-05-17 05:49:14 +08:00
interface ThrowableInterface {
2003-03-07 23:56:31 +08:00
public function getMessage();
public function getErrno();
}
2015-05-17 05:49:14 +08:00
class Exception_foo implements ThrowableInterface {
2003-03-07 23:56:31 +08:00
public $foo = "foo";
public function getMessage() {
return $this->foo;
}
}
// this should die -- Exception class must be abstract...
2003-03-29 02:58:18 +08:00
$foo = new Exception_foo;
2005-05-03 17:52:01 +08:00
echo "Message: " . $foo->getMessage() . "\n";
2003-03-07 23:56:31 +08:00
?>
2005-05-03 17:52:01 +08:00
===DONE===
2003-03-07 23:56:31 +08:00
--EXPECTF--
2015-05-17 05:49:14 +08:00
Fatal error: Class Exception_foo contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (ThrowableInterface::getErrno) in %s on line %d