summaryrefslogtreecommitdiff
path: root/Zend/tests/ns_054.phpt
blob: 9b8defc9ac3f4bcda1ad60a4126e8421f05dd933 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--TEST--
054: namespace and interfaces
--FILE--
<?php
namespace test\ns1;

class Foo implements \SplObserver {
    function update(\SplSubject $x) {
        echo "ok\n";
    }
}

class Bar implements \SplSubject {
    function attach(\SplObserver $x) {
        echo "ok\n";
    }
    function notify() {
    }
    function detach(\SplObserver $x) {
    }
}
$foo = new Foo();
$bar = new Bar();
$bar->attach($foo);
$foo->update($bar);
?>
--EXPECT--
ok
ok