什么是 zend 扩展?

What is exactly a zend extension?

如果你看this documentation,第一个参数returns只有Zend扩展。 与 PHP ("simple") 扩展相比,Zend 扩展到底是什么?

Zend 扩展挂钩到语言的“较低级别”。单个扩展既可以是 PHP 扩展也可以是 Zend 扩展。 Xdebug 两者都是,例如,使用 Zend 扩展组件挂钩到语言的较低层以拦截调用以进行调试。

Zend 扩展是 Zend 引擎 (ZE) 本身的扩展,它是 PHP 堆栈的最低级别。

The PHP Wiki 提供了很多附加信息。我引用一下介绍:

As you should know, we distinguish between “PHP extensions” and “Zend extensions”. Consider this vocabulary to follow the article, as internally, the sources prefer talking about PHP extensions as “modules” and Zend extensions as “extensions”. We'll keep the more clear “PHP extension” vs “Zend extension” wordings.

Both extension kinds share lots of stuff. The difference between both types is mainly in hooks they register into the Engine. Remember that, despite it is very uncommon, an extension can be both a PHP extension and a Zend extension at the same time. Xdebug is a good example.

一般情况下,Zend 扩展也会在 PHP 扩展之前加载。

一个示例 PHP 扩展名是 PHP Redis Extension。这是一个仅 PHP 的扩展,不会直接连接到 Zend 引擎。