摘要:
class myClass{ public $a = "5"; public $b = "7"; public $c = "9"; function __tostring(){ return(var_export($this,TRUE)); } } $x = new myclass();foreach($x as $attribute){ echo $attribute."br /";} ... 阅读全文
摘要:
class classname { public $attribute; function operation($param){ $this-attribute = $param; echo $this-attribute; } function __construct(){ echo "constructor called "; } function __get($name){ return... 阅读全文
摘要:
class overload{ public function __call($method,$p){ if($method == "display"){ if(is_object($p[0])){ $this-displayObject($p[0]); }else if (is_array($p[0])){ $this-displayArray($p[0]); }else { $this-... 阅读全文