0
0
mirror of https://github.com/php/php-src.git synced 2024-12-14 04:16:30 +08:00
php-src/Zend/tests/bug62441.phpt

20 lines
494 B
Plaintext
Raw Normal View History

--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) { }
}
2018-09-17 01:16:42 +08:00
(new Foo)->method(new \stdClass);
}
?>
--EXPECTF--
Fatal error: Could not check compatibility between ns\Foo::method(ns\stdClass $o) and Iface::method(stdClass $o), because class ns\stdClass is not available in %s on line %d