There's also the case of currency handling, where rather than arbitrary precision, you want fixed precision, with rounding according to fixed rules at specific steps.
I've been experimenting with embedded SAPI to build an HTTP server with use of libmicrohttpd but when I run it in terminal and execute request towards HTTP server I get this error
I would recommend compiling with the address sanitizer enabled. This will point you to the place that allocated the object. To make that work you'll also have to set the USE_ZEND_ALLOC environment variable to 0
If you can't figure it out I can help you in half an hour or so