TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
398 B
24 lines
398 B
--TEST--
|
|
abstract class and abstract method
|
|
--FILE--
|
|
<?php
|
|
namespace {
|
|
use App1\Dog;
|
|
use App1\Animal;
|
|
|
|
function foo(Animal $animal) {
|
|
$rs = $animal->speak();
|
|
var_dump($rs);
|
|
}
|
|
|
|
function main() {
|
|
include __DIR__ . "/abstract-class.inc";
|
|
$dog = new Dog("Buddy");
|
|
foo($dog);
|
|
echo "done\n";
|
|
}
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
string(4) "woof"
|
|
done
|
|
|