File tree 2 files changed +32
-1
lines changed 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ 054: namespace and interfaces
3
+ --SKIPIF--
4
+ <?php if (!extension_loaded ("spl " )) die ("skip SPL is no available " ); ?>
5
+ --FILE--
6
+ <?php
7
+ namespace test ::ns1;
8
+
9
+ class Foo implements SplObserver {
10
+ function update (::SplSubject $ x ) {
11
+ echo "ok \n" ;
12
+ }
13
+ }
14
+
15
+ class Bar implements SplSubject {
16
+ function attach (::SplObserver $ x ) {
17
+ echo "ok \n" ;
18
+ }
19
+ function notify () {
20
+ }
21
+ function detach (::SplObserver $ x ) {
22
+ }
23
+ }
24
+ $ foo = new Foo ();
25
+ $ bar = new Bar ();
26
+ $ bar ->attach ($ foo );
27
+ $ foo ->update ($ bar );
28
+ ?>
29
+ --EXPECT--
30
+ ok
31
+ ok
Original file line number Diff line number Diff line change @@ -3136,7 +3136,7 @@ void zend_do_implements_interface(znode *interface_name TSRMLS_DC)
3136
3136
if (CG (active_op_array )-> last > 0 ) {
3137
3137
opline = & CG (active_op_array )-> opcodes [CG (active_op_array )-> last - 1 ];
3138
3138
if (opline -> opcode == ZEND_FETCH_CLASS ) {
3139
- opline -> extended_value = ZEND_FETCH_CLASS_INTERFACE ;
3139
+ opline -> extended_value = ( opline -> extended_value & ~ ZEND_FETCH_CLASS_MASK ) | ZEND_FETCH_CLASS_INTERFACE ;
3140
3140
}
3141
3141
}
3142
3142
break ;
You can’t perform that action at this time.
0 commit comments