主页
PHP
PHP OOP 类和对象
tryphp_class4
运行 ❯
×
更改方向
保存代码
更改主题
<!DOCTYPE html> <html> <body> <?php class Fruit { public $name; public $color; } $apple = new Fruit(); var_dump($apple instanceof Fruit); ?> </body> </html>
bool(true)