c++ - Which PHP extension source code is most suitable for novices to learn and read?
过去多啦不再A梦2017-06-05 11:07:15
0
1
493
RT After taking a look, extension codes such as mysql, pdo, json, etc. are relatively large and have complex logic. Is there any simple extension source code suitable for novices to learn and read?
先不着急写扩展,先熟悉PHP内核源代码
《深入理解PHP内核》
http://www.php-internals.com/
PHP7内核剖析
https://github.com/pangudashu...
看完了结构,写扩展,信手拈来啊。
如果没有时间,需要跳过变量、常量的学习,可以直接看这个扩展对
PHP
常用变量类型的一些读写手段,这是一个序列化类,效率比原生的高出40%
。就一个实现文件,简单好懂,并且同时导出了类和函数。https://github.com/swoole/swo...