pangudashu / php7-internal Goto Github PK
View Code? Open in Web Editor NEWPHP7内核剖析
PHP7内核剖析
Hello @pangudashu. Do you have any plan for translating to English?
找了很多资料,终于在作者这里找到答案,能否留个联系方式交流
https://github.com/zimuyang/php7-internal/blob/master/img/EG.png
图片中 HashTable *zend_constants 的文字说明应该是常量吧?
如题,比较疑惑5.4之后cli sapi支持的web server算不算PHP支持的一种HTTP网络库呢?
小菜鸟
在下面这篇文章中:
https://github.com/pangudashu/php7-internal/blob/master/2/zval.md
有个demo:
$a = "time:" . time(); //$a -> zend_string_1(refcount=1)
$b = $a; //$a,$b -> zend_string_1(refcount=2)
$c = $b; //$a,$b,$c -> zend_string_1(refcount=3)
unset($b); //$b = IS_UNDEF $a,$c -> zend_string_1(refcount=2)
我用php7.0实际运行的结果是:
<?php
$a = "time:" . time(); //$a -> zend_string_1(refcount=1)
debug_zval_dump($a);
$b = $a; //$a,$b -> zend_string_1(refcount=2)
$c = $b; //$a,$b,$c -> zend_string_1(refcount=3)
debug_zval_dump($a);
unset($b); //$b = IS_UNDEF $a,$c -> zend_string_1(refcount=2)
debug_zval_dump($a);
输出:
string(15) "time:1629940681" refcount(2)
string(15) "time:1629940681" refcount(4)
string(15) "time:1629940681" refcount(3)
想请教下,是什么原因导致了这种差异?
众所周知, php是使用automake工具进行管理和编译的。但是我只在各个文件夹中看到了Makefile.am文件(例如 php-5.6.31/TSRM/Makefile.am) ,并没有在最外层(php-5.6.31/)看到。 那么php是如何使用autolib工具的?只有Makefile.global和Makefile.frag。这两个文件的作用是什么?
有错误请留言指正或直接提merge request
请求处理完后发现需要g c, 之后是哪个地方去集中处理的?PHP-FPM?
还是等到下一次请求来了先把上一次g c先处理完,还是有个专门的gc线程
定时扫描?
Hi~QP,我对 PHP 是外行,这里问一个与内容无关的问题,文中配图都很棒,是用什么工具画的啊?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.