interface MyInterface
{
- public function __construct(Object $o);
+ public function __construct(MyObject $o);
}
class MyTestClass implements MyInterface
{
- public function __construct(Object $o)
+ public function __construct(MyObject $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
+Catchable fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class MyObject, called in %sinterfaces_003.php on line %d
--TEST--
ZE2 __toString() in __destruct/exception
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
?>
====DONE====
--EXPECTF--
-Fatal error: Object of class Test could not be converted to string in %stostring_003.php on line %d
+Fatal error: Method Test::__toString() must not throw an exception in %stostring_003.php on line %d