mirror of
https://github.com/php/php-src.git
synced 2024-10-18 23:12:35 +00:00
34 lines
493 B
Plaintext
34 lines
493 B
Plaintext
|
--TEST--
|
||
|
ZE2 interface and __construct
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
class MyObject {}
|
||
|
|
||
|
interface MyInterface
|
||
|
{
|
||
|
public function __construct(Object $o);
|
||
|
}
|
||
|
|
||
|
class MyTestClass implements MyInterface
|
||
|
{
|
||
|
public function __construct(Object $o)
|
||
|
{
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$obj = new MyTestClass;
|
||
|
|
||
|
class MyTestFail
|
||
|
{
|
||
|
public function __construct()
|
||
|
{
|
||
|
}
|
||
|
}
|
||
|
|
||
|
?>
|
||
|
===DONE===
|
||
|
--EXPECTF--
|
||
|
|
||
|
Catchable fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class Object, called in %sinterfaces_003.php on line %d
|