}$sa =
new
sample();
foreach($sa as $key => $val){
print $key . "=>" .$val;
} 以上代码在我的
php 5.3 下运行正常。