search

Home  >  Q&A  >  body text

c++ - Which PHP extension source code is most suitable for novices to learn and read?

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?

过去多啦不再A梦过去多啦不再A梦2731 days ago606

reply all(1)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-05 11:09:15

    Don’t rush to write extensions, get familiar with the PHP kernel source code first

    • 《In-depth understanding of PHP kernel》
      http://www.php-internals.com/

    • PHP7 Kernel Analysis
      https://github.com/pangudashu...

    After reading the structure, writing extensions is easy.

    If you don’t have time and need to skip learning variables and constants, you can directly look at this extension’s reading and writing methods for PHPcommonly used variable types. This is a serialization class, and the efficiency is 40% higher than the native one. It's just an implementation file, simple and easy to understand, and it exports classes and functions at the same time.
    https://github.com/swoole/swo...

    reply
    0
  • Cancelreply