
进阶PHP
enlyhua
这个作者很懒,什么都没留下…
展开
-
1. 解决问题的能力
这里举个例子,假如我执行了一个PHP的脚本,如php test.php,预期是可以返回一个字符串。 但执行后没有任何信息输出,这时候通过什么方法能知道程序错在哪里?这里可以将解决问题能力分 为8个等级,越到后面的表示能力越强。ini_set('display_errors',1); error_reporting(E_ALL); http://rango.swoole.com/ar转载 2017-01-06 13:16:59 · 872 阅读 · 0 评论 -
3.in_array低性能问题
<?php $y="1800"; $x = array(); for($j=0;$j<2000;$j++){ $x[]= "{$j}"; } for($i=0;$i<3000;$i++){ if(in_array($y,$x)){ continue; } } ?> http://mp.weixin.qq.com/s?__biz=MzAxNzMw转载 2017-12-07 13:02:39 · 388 阅读 · 0 评论 -
5. PHP APC & APCu 安装使用
1.通过 pecl 安装 pecl search APC pecl install APC2.源码安装 wget ... phpize ./configure make make install源码下面有个 apc.php 脚本 https://pecl.php.net/package/APChttp://blog.youkuaiyun.com/me原创 2017-12-19 16:21:08 · 394 阅读 · 0 评论 -
7. PHP Xhprof
1.安装 1. git clone https://github.com/phacility/xhprof.git 2.通过 pecl http://pecl.php.net/package/xhprof http://blog.youkuaiyun.com/qq_28602957/article/details/72697901 http://avnpc.c...转载 2018-01-14 21:23:48 · 191 阅读 · 0 评论 -
8. PHP7 安装
1.源码安装配置 ./configure --prefix=/usr/local/php --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d -enable-fpm --with-php-config=php-config所在目录 2.用 remi 安装 php ...原创 2018-01-20 00:50:08 · 232 阅读 · 0 评论 -
9.Tideways和xhgui
http://blog.it2048.cn/article_tideways-xhgui.html http://blog.oneapm.com/apm-tech/235.html http://blog.oneapm.com/apm-tech/219.html http://blog.oneapm.com/apm-tech/216.html https://tideways.io/pro...转载 2018-02-26 14:42:54 · 403 阅读 · 0 评论 -
11.PHP-FPM pool
https://blog.youkuaiyun.com/jkx1132/article/details/78253422 https://blog.youkuaiyun.com/MrDing991124/article/details/79018917 https://blog.youkuaiyun.com/mrding991124/article/details/79018917转载 2018-04-02 16:42:28 · 192 阅读 · 0 评论 -
12.PHP-FPM
1.优点 2.配置 http://php.net/manual/zh/install.fpm.configuration.php转载 2018-08-27 22:01:57 · 120 阅读 · 0 评论 -
10.PHP 流
自定义 Stream: http://php.net/manual/zh/stream.streamwrapper.example-1.php 应用场景: <?php /** * Example of stream filtering. */ // Open two file handles. $in = fopen('test.txt.bz2'...转载 2018-03-02 00:29:51 · 325 阅读 · 0 评论 -
13. PHP OPcache
//opcache 配置信息 http://php.net/manual/zh/opcache.configuration.php#ini.opcache.enable // ui https://laravel-china.org/topics/301/using-opcache-to-enhance-the-performance-of-the-php-55-program...转载 2018-10-17 15:40:37 · 147 阅读 · 0 评论 -
14.PHP vld 扩展
http://www.php-internals.com/book/?p=C-php-vld http://www.phppan.com/2011/05/vld-extension/ https://gywbd.github.io/posts/2016/2/vld-opcode.html转载 2018-11-19 17:35:46 · 203 阅读 · 0 评论 -
15.深入理解Zend执行引擎(PHP5)
http://gywbd.github.io/posts/2016/2/zend-execution-engine.html转载 2018-11-27 14:47:23 · 250 阅读 · 0 评论 -
16.PHP 协程
1.yield只能用于函数内部,在非函数内部运用会抛出错误。 2.如果函数包含了yield关键字的,那么函数执行后的返回值永远都是一个Generator对象。 3.如果函数内部同事包含yield和return 该函数的返回值依然是Generator对象,但是在生成Generator对象时,return语句后的代码被忽略。 4.Generator类实现了Iterator接口。 5.可以通过返回的Ge...转载 2019-04-08 17:46:51 · 97 阅读 · 0 评论 -
4.xdebug
https://www.cnblogs.com/zx-admin/p/5403348.htmlhttp://blog.youkuaiyun.com/tstbdt/article/details/46454951转载 2017-12-15 12:54:06 · 161 阅读 · 0 评论 -
6. PHP bcompiler
http://www.jb51.net/article/24669.htmhttp://www.geekso.com/post/424/转载 2017-12-20 10:35:11 · 488 阅读 · 0 评论 -
2.妙用 register_shutdown_function和fastcgi_finish_request
http://www.bo56.com/%E5%A6%99%E7%94%A8php%E4%B8%AD%E7%9A%84register_shutdown_function%E5%92%8Cfastcgi_finish_request/转载 2017-11-20 10:17:04 · 366 阅读 · 0 评论 -
17.PHPDoc 规范,PHPDocumenter 生成
https://www.cnblogs.com/chunguang/p/5717629.html http://www.laruence.com/2009/04/21/680.html转载 2019-04-18 11:12:12 · 210 阅读 · 0 评论