摘要: 原文地址:http://www.600mhz.net/php/php_runtime_instance_class_and_pass_parameters.html/comment-page-1在框架开发,模块化开发等场合,我们可能有一种需求,那就是在PHP运行时动态实例化对象。什么是动态实例化对象呢?我们先来看一下PHP有一种变量函数(可变函数)的概念,例如如下代码:?12345function foo() {echo 'This is the foo function';}$bar = 'foo';$bar();运行上述代码将会输出“This is the 阅读全文
posted @ 2013-03-28 19:42 hpliu 阅读(3291) 评论(0) 推荐(0) 编辑