php strtotime 常用要点
发表于|更新于|php
|浏览量:
strtotime 是个常用的函数
一般是获取当前时间
手册中是他的语义化的用法
1 | strtotime("+2 day" ,time()) |
文章作者: developer
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Dev!
相关推荐
2015-09-20
php魔术方法__call和__callStatic
__call($name,$arguments)当对象访问不存在时候,__call被调用 __callStatic当对象访问不存在的静态方法时候,__callStatic被调用定义时也要把__callStatic定义为静态方法public static __callStatic($name,$arguments)使用两个点访问静态方法test::runtest();
2019-06-02
PHP 常用算法
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153/** * 二分查找(数组里查找某个元素) * @param array $array * @param int $low 最小索引 * @param int $high 最大索引 * @param mixed $search 待查找元素 * @return mix...
2015-09-10
mysql_insert_id
mysql_insert_id获得mysql查询后的自增主键的id
2019-03-04
thinkphp beego swoft yaf 性能测试 压力测试 php go swoole 速度对比 helloworld
1ab -n 10000 -c 200 测试机为腾讯云1核1G普通云硬盘,如果用ssd的话php成绩会有所提升 输出内容为时间戳 beego swoft的性能都强的不得了,在同一级别,裸跑性能都逼近nginx处理静态文件nginx转发损耗很大,由于nginx转发会导致thinkphp,swoft,beego的性能几乎一样。所以有可能的话还是不要在这些框架外套个nginx了swoft+nginx:内存无波动,CPU占用81%swoft无nginx:内存无波动,CPU占用34% thinkphp+nginx41212345678910111213141516171819202122232425262728Concurrency Level: 200Time taken for tests: 24.256 secondsComplete requests: 10000Failed requests: 0Total transferred: 1940000 bytesHTML transferred: 190000 by...
2015-09-09
getenv
取得系统的环境变量 语法: string getenv(string varname); 返回值: 字符串 函数种类: PHP 系统功能 内容说明 若正确取得环境变量 varname,则返回变量值。失败则返回 false。 使用范例 下例可以取得用户浏览器所在机器的网址 $ip = getenv(“REMOTE_ADDR”);
2015-09-20
php魔术方法 __clone
当你使用clone关键字时,__clone 就会触发
公告
This is my Blog