1--TEST-- 2056: type-hint compatibility in namespaces 3--FILE-- 4<?php 5namespace test\ns1; 6use \SplObserver; 7 8class Foo implements SplObserver { 9 function update(\SplSubject $x) { 10 echo "ok\n"; 11 } 12} 13 14class Bar implements \SplSubject { 15 function attach(SplObserver $x) { 16 echo "ok\n"; 17 } 18 function notify() { 19 } 20 function detach(SplObserver $x) { 21 } 22} 23$foo = new Foo(); 24$bar = new Bar(); 25$bar->attach($foo); 26$foo->update($bar); 27?> 28--EXPECT-- 29ok 30ok 31