Building PHP Extensions With C++

By Lochemem Bruno Michael

PHP extensions are primarily composed of additions (functions and classes) to the PHP userland. Considering the PHP virtual machine is built in C, it holds that extensions are generally idiomatic C-based syntaxes. C++, a syntax-base with C-linkage capability, is an eligible extension-builder language and quite robust in its offerings. In particular, C++ 11 and newer versions boast modern features such as Lambda functions, the auto keyword, and templates. Together they can allow for the materialization of powerful PHP modules when used in conjunction with PHP engine-facing syntax.

Read in Full

This article was originally published in the November 2019 issue of php[architect] magazine. To read the complete article please subscribe or purchase the complete issue.

Leave a comment

Use the form below to leave a comment: