php 的stdClass类的简单实用

<?php
$person = new stdClass();
$person->name = "yu";
$person->sex = "man";
$person->school = array("a", "b", "c");
$person->aa =  func();

function func(){
    echo "11111";
}

echo $person->aa;
print_r($person->school);
?>

 

posted @ 2016-01-05 13:34  天道酬勤,坚持!  阅读(436)  评论(0编辑  收藏  举报