php-src/Zend/tests/bug62441.phpt
Nikita Popov ccec609b82 Fix bug #62441
These checks were introduced by 8646d9afce
back when name resolution was working differently.
2015-08-28 19:00:05 +02:00

21 lines
452 B
PHP

--TEST--
Bug #62441: Incorrect strong typing in namespaced child classes
--FILE--
<?php
namespace {
interface Iface {
function method(stdClass $o);
}
}
namespace ns {
class Foo implements \Iface {
function method(stdClass $o) { }
}
(new Foo)->method(new \stdClass);
}
?>
--EXPECTF--
Fatal error: Declaration of ns\Foo::method(ns\stdClass $o) must be compatible with Iface::method(stdClass $o) in %s on line %d