mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
23 lines
334 B
PHP
23 lines
334 B
PHP
--TEST--
|
|
ZE2 interfaces
|
|
--FILE--
|
|
<?php
|
|
|
|
interface ThrowableInterface {
|
|
public function getMessage();
|
|
}
|
|
|
|
class Exception_foo implements ThrowableInterface {
|
|
public $foo = "foo";
|
|
|
|
public function getMessage() {
|
|
return $this->foo;
|
|
}
|
|
}
|
|
|
|
$foo = new Exception_foo;
|
|
echo $foo->getMessage() . "\n";
|
|
|
|
?>
|
|
--EXPECT--
|
|
foo
|