<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                我們看一個demo ``` <?php /** * User: 三千 * Date: 16/3/15 * Time: 下午5:18 */ class person{ public $name; public $gender; public function say(){ echo $this->name,"\t is ",$this->gender,"\r\n"; } } class family{ public $people; public $location; public function __construct($p,$loc){ $this->people = $p; $this->location = $loc; } } $student = new person(); $student->name = "Tom"; $student->gender = "male"; $student->say(); $tom = new family($student,"peking"); echo serialize($student); $student_arr = array("name"=>"Tom","gender"=>"male"); echo "\n"; echo serialize($student_arr); print_r($tom); echo "\n"; echo serialize($tom); ``` 返回結果 ``` Tom is male O:6:"person":2:{s:4:"name";s:3:"Tom";s:6:"gender";s:4:"male";} a:2:{s:4:"name";s:3:"Tom";s:6:"gender";s:4:"male";}family Object ( [people] => person Object ( [name] => Tom [gender] => male ) [location] => peking ) O:6:"family":2:{s:6:"people";O:6:"person":2:{s:4:"name";s:3:"Tom";s:6:"gender";s:4:"male";}s:8:"location";s:6:"peking";}% ``` 序列化后的對象會附帶所屬的類名,這個類名保證此對象能夠執行類的方法時,可以正確地找到方法所在的代碼空間。另外,當一個對象的實例變量引用其他對象時,序列化該對象時也會對引用對象進行序列化。 對象和類的概念及兩者之間的關系: - 類是定義一系列屬性和操作的模板,而對象則把屬性進行具體化,然后交給類處理 - 對象就是數據,對象本身不包含方法。但是對象有一個“指針”指向一個類,這個類里可以有方法。 - 方法描述不同屬性所導致的不同表現。 - 類和對象是不可分割的,有對象就必定有一個類和其對應,否則這個對象也就成了沒有親人和孩子
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看