<?php //php序列化 class Stu { public $name = '明明'; } $obj = new Stu(); $str = serialize($obj); var_dump($str);