mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
21 lines
303 B
PHP
21 lines
303 B
PHP
--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);
|
|
--EXPECTF--
|
|
bool(true)
|
|
bool(true)
|
|
|