php
gurenshen
这个作者很懒,什么都没留下…
展开
-
PHP面向对象基础
命名空间命名空间:为了避免命名冲突。php5.3之后加入了命名空间。namespace关键字必须在文件开头。示例代码:文件test1.php<?php namespace Test1; function test() { echo 'this is test 1'; }文件二test2.php <?php namespa原创 2016-07-06 08:17:56 · 390 阅读 · 0 评论 -
PHP之匿名函数
Closure类,用于代表匿名函数的类。 http://blog.csdn.net/wuxing26jiayou/article/details/51067190Closure::__construct — 用于禁止实例化的构造函数Closure::bind — 复制一个闭包,绑定指定的$this对象和类作用域。Closure::bindTo — 复制当前闭包对象,绑定指定的$this对象和类原创 2017-04-10 08:54:47 · 602 阅读 · 0 评论