Tech
# Why I’m Rewriting a PHP Extension in C23, Not C++
I forked the DataStax Cassandra driver when it stopped compiling on PHP 8 and most of its maintainers had already moved on. My first instinct was to write the new parts in C++. I built a Zend wrapper class, used RAII throughout, and put smart pointers around zval s—the whole modern setup.
It introduced memory bugs that took me days to track down, and I did not get a meaningful benefit in return.
So the driver is being rewritten in C23.
I want to explain why, because “just use C++; it’s...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to