php clone使用示例
php clone使用示例 [代码片段(14行)]
<?php class Integer { private $number; public function getInt() { return (int)$this->number; } public function setInt($num) { $this->number = (int)$num; } } $class_one = new Integer(); $class_one_copy = clone $class_one; ?>
- 上一篇:php array_push方法在数组末尾追加元素
- 下一篇:php的数组赋值
精彩图集
精彩文章