Examining the FFI class
As you learned in this chapter, not every developer has a need to use the FFI extension. Having direct experience with the FFI extension deepens your understanding of the internals of the PHP language, and this deepened understanding can have a beneficial impact on your career as a PHP developer: it's quite possible that at some point in the future, you will be employed by a company that has developed a custom PHP extension. Knowing how to operate the FFI extension in this situation allows you to develop new features for a custom PHP extension, as well as helping you to troubleshoot extension problems.
The FFI
class consists of 20 methods that fall into four broad categories, outlined as follows:
- Creational: Methods in this category create instances of classes available from the FFI extension application programming interface (API).
- Comparison: Comparison methods are designed to compare C data values.
- Informational: This set of methods...