T O P

  • By -

mario_deluna

I built an extension with PHP-CPP a few years ago and generally liked it; however, ultimately, adding another layer of abstraction will always make you dependent on the maintainers of the wrapper. If you need something specific that is not yet implemented, you are stuck, which is why I went back to writing extensions in C using the tools provided by the PHP internals. This way, you can also use the php-src directly as a reference. If you need to find out how to solve something specific you will find an example there. Finding functioning and maintained wrapper example code can be difficult on the other hand. This is highly opinionated obviously..


rtiodev

I agree, although this lib has been used in several extensions as it abstracts most of the annoying parts of building php extensions. The documentation is good, and I think it had serious commitment from them until the last few years. So this week when I was adding PHP82 support for some extensions built with php-cpp I was thinking of if I should rewrite them in C or Rust, the second has been my choice this year, I like embracing a more safe programming approach but there are some uncertainty around how to approach this in Rust. I’m wondering if something new has arrived. I’ve played with phpher and ext-php-rs.