1.ASCII码表中,数字0从48开始,数字<一般符号<大写英文字母<小写英文字母。 A<Z<a
2.类中的__set()和__get()是对私有变量好使的。傻逼
<span style="font-size:18px;">class obj1{
private $attribute;
// function __construct($value){
//// echo "Constructor called with value".$value."<br/>";
// $this->attribute=$value;
// }
function __get($name){
return $this->$name;
}
function __set($name,$value){
$this->$name=$value;
// echo 'fdas';
}
function __destruct(){
}
}
$a=new obj1();
$a->attribute=5;
echo $a->attribute;</span>
3.