代码改变世界

check process id exists

2017-11-22 10:43 by brookin, 240 阅读, 0 推荐, 收藏, 编辑
摘要:kill 0 pid sending the signal 0 to a given PID just checks if any process with the given PID is running and you have the permission to send a signal t 阅读全文

max_execution_time with sleep

2017-11-22 10:25 by brookin, 171 阅读, 0 推荐, 收藏, 编辑
摘要:Under Linux, sleeping time is ignored, but under Windows, it counts as execution time. Note The set_time_limit() function and the configuration direct 阅读全文

composer 用法

2017-11-21 20:51 by brookin, 153 阅读, 0 推荐, 收藏, 编辑
摘要:构建工程 composer create project test/name project_name help composer help create project 参数 prefer dist 强制使用压缩包,而不是克隆源代码 prefer source 优先使用源代码 阅读全文

PHPUnit

2017-11-21 20:48 by brookin, 137 阅读, 0 推荐, 收藏, 编辑
摘要:PHPUnit 运行指定的 testCase phpunit tests/Screw/StrTest 运行指定的 testCase Method phpunit tests/Screw/StrTest filter Println 注意:Method 是大小写敏感的 阅读全文

变长参数处理

2017-10-31 11:52 by brookin, 183 阅读, 0 推荐, 收藏, 编辑
摘要:1. func_get_args 示例 2. using ... operator Notice: PHP version 5.6 meanwhile you can set the type of parameters In php 7 3. use ReflectionClass 阅读全文

GET 和 POST 比较整理

2017-10-23 22:45 by brookin, 170 阅读, 0 推荐, 收藏, 编辑
摘要:差异 1. 上传文件只能使用 POST 2. GET 传输数据有大小限制 3. GET 传输的数据类型不灵活:GET是使用url来传输数据,那么比如空格字符以及类似&这样的字符就不方便传输。(当然可以使用发送前编码,以及接受后解码的方法来解决) 常见特殊字符 url 传输过程编码表 空格 传输过程转 阅读全文

常用 shell & 语法

2017-08-28 12:05 by brookin, 153 阅读, 0 推荐, 收藏, 编辑
摘要:参数逻辑判断 watch 功能:监控 PHP 进程的变化 原理: 重复的执行后面的命令,默认时间间隔是2秒 参数解释 阅读全文

phpstorm 用法

2017-08-25 18:06 by brookin, 106 阅读, 0 推荐, 收藏, 编辑
摘要:同时打开多个工程,多项目并存 快速模板 阅读全文

case insensitive in php

2017-07-27 23:02 by brookin, 138 阅读, 0 推荐, 收藏, 编辑
摘要:date: 2017 07 27 PHP的命名空间是否区分大小写? 结论:不区分大小写,与类名一样(不区分大小写)。 不区分大小写的包括 1. 函数名 2. 方法名 3. 类名 4. 控制语句(if, else, for, while, foreach) 5. null,true, false 6. 阅读全文

PHP 常量定义

2017-05-22 23:59 by brookin, 199 阅读, 0 推荐, 收藏, 编辑
摘要:常量定义 PHP =5.3 支持在全局命名空间和类中使用 const 定义常量。 旧式风格: define("XOOO", "Value"); // 错误用法。等到PHP 7才支持。 define("XO", [1, 2, 3]); // 解决:define("XO", json_encode([1 阅读全文
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页