<?php
//定义一个人类
class Person{
public $name;
public $age;
//构造方法
// public function Person(){
// echo "OK";
// }
public function__construct(){
echo "我是构造函数";
}
}
$p1 = new Person();
?>
提示错误说:Parse error: parse error, expecting `T_VARIABLE' in D:\wamp\www\snowinmay\test\php\Person1.class.php on line 12