1 Star 0 Fork 193

程序源代码/video

forked from 后盾人/v2015 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
static.php 515 Bytes
一键复制 编辑 原始数据 按行查看 历史
后盾人 提交于 2017-05-02 15:00 +08:00 . no message
<?php
class News {
public function save() {
echo 'save';
}
public static function __callStatic( $name, $arguments ) {
//houdunren.com
// echo $name;
// print_r($arguments);
static $cache = NULL;
if ( is_null( $cache ) ) {
$cache = new Db;
}
return call_user_func_array([$cache,$name],$arguments);
}
}
class Db {
public function find( $id ) {
echo 'id:' . $id;
}
}
//
//$obj = new Db;
//$d = $obj->find(2);
//print_r($d);
//$instance= new News;
//$instance->save();
News::find( 3);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/itcode-itcode/video.git
git@gitee.com:itcode-itcode/video.git
itcode-itcode
video
video
master

搜索帮助