面向对象
作者:互联网
<?php class phpClass{ var $name=12; var $sex="boy"; function __construct($a='default',$b=12){ echo $a."\n"; } function say(){ return $this->name; } } $p=new phpClass(); echo $p->say(); echo (new phpClass('bbbb'))->say()."\n"; ?>
标签:name,bbbb,echo,面向对象,say,phpClass,new 来源: https://www.cnblogs.com/mlh1421/p/10381764.html