php
转转兜兜哈
这个作者很懒,什么都没留下…
展开
-
php unit 关于php的单元测试
目前项目里开发使用的测试方法都是php unit,不像之前埋个日至或者 用chrome 以及postman模拟请求。 在testcase继承了之后,然后新类直接继承父类,重写身份验证的方法,直接返回uid,然后直接调用get或者post方法。 还有个php的mock方法。继续深入学习和了解当中 地下是一个简单的demo <?php /** ...原创 2018-09-07 09:29:43 · 2508 阅读 · 0 评论 -
php-反射机制
php自5.0开始提供了反射机制 ,主要是 反射类(ReflectionClass)和反射函数(ReflectionFunction)等, (个人简介,就是在通用的实例化方法里 ,传入了$class_name) 什么是反射 他是指PHP在运行状态中,动态的获取类、方法、属性、参数、注释等信息和动态调用对象的方法的功能。 有什么用 可以帮助我们构建复杂的,可扩的运用。比如自动加载插件,自动生成...原创 2018-12-28 14:20:54 · 113 阅读 · 0 评论 -
In PHP you can combine arrays using + or you can use array_merge. What’s the difference?
from https://www.texelate.co.uk/blog/combining-arrays-using-plus-versus-array-merge-in-php There are some differences between using associative arrays and sequential arrays. Associative arrays first...转载 2018-12-29 13:40:46 · 104 阅读 · 0 评论