summaryrefslogtreecommitdiff
path: root/Zend/tests/anon/002.phpt
blob: fdb8915267efd175d159c49eac97d78b06354dcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
declare anonymous class extending another
--FILE--
<?php
class A{}

interface B{
    public function method();
}

$a = new class extends A implements B {
    public function method(){
        return true;
    }
};

var_dump($a instanceof A, $a instanceof B);
--EXPECT--
bool(true)
bool(true)