展开查看详情
1.PHP
—
2.PHPCon PPT
https://github.com/ThinkDevelopers/PHPConChina
PPT PHPCon
3.PHP
https://segmentfault.com/a/1190000012028295
4. PHP
PHP is a popular general-purpose scripting language that is especially suited to web development.
5.PHP
/C/C++
nginx
java/c#/go
service
AI
PHP
or
6. PHPer
1.
2.
3.
4.
5.
7.1.
8.PHP
vars
tmps
args
str_repeat
vars
tmps
args
foo
9.1
2
3
10.PHP
or opcache
11.PHP
unset null
12. $var
0
refcount
0
• composer gc_disable() 10000
• gc
• gc_disable()
13.FPM —php_request_shutdown
array object string heap/stack
zval function class_entry extensio
PHP
emalloc/efree*
RSHUTDOWN=>
php_request_shutdown
zend MM
emalloc*(ext efree gc_disable() )
operate system
14. php_request_shutdown
1.max_request
(1) (base )
(2)
(3)
(4) (opcache,ext minits)
2. unset
15.• unset
16.
17.
18.—
19.—FPM swoole
20. 2.
mysql
PHP (e.g php7_warpper)
:
21. —FPM
FPM
worker
accept
worker
worker
master
prefork
worker
worker
worker
close
22. —Swoole
swoole(base)
accept
worker
worker
worker
master
prefork
worker
reactor
worker
worker
close
23.
24. strace -p 123456
lsof -p 123456
fd
strace
PHP
25.swoole/FPM
ptrace
26.mysql
27.profile —Xhprof
28. profile
profile
PHP
PHP
29.c profile —callgrind
https://www.bo56.com