主页
PHP
PHP OOP 类和对象
tryphp_this2
运行 ❯
×
更改方向
保存代码
更改主题
<!DOCTYPE html> <html> <body> <?php class Fruit { public $name; } $apple = new Fruit(); $apple->name = "Apple"; echo $apple->name; ?> </body> </html>
Apple