How to call native c++ function

How can i call c++ function and return output in zephir function here c++ function std::string myoutput(const std::string& input)

I also wondered this, if its possible to run native c++ code with zephir, sometimes relying on native php functions isnt enough.

This will be tricky, since Zephir compiles down to C, not C++. That said, calling C functions directly from Zephir and/or PHP is exactly what Optimizers are designed for.

The limitation with those, however, is that they expose logic to PHP directly, and then Zephir calls the PHP function. If you're attempting to avoid providing a functional API alongside your OO API, this will probably be a small problem, and at the moment, there's no real fix.