Do you still use preloading scripts on PHP 8? #php

@jorisvaesen Yes. Should this be a poll?

Symfony makes it really easy to use by default so there's no reason not to.

If you use FFI in a web request then you have to use preload for the file(s) containing the FFI scope command.

@zimzat @jorisvaesen I'm curious, what do you use FFI for?

@chrastecky @jorisvaesen Built a library in Rust to run geospatial operations against a string of GeoJSON. Calculating polygon differences, unions, or simplify, and point intersect checks.

The PHP libraries to do stuff like this are extremely dated, not performant, not cross-compatible (a Polygon in one library !== Polygon in another, so every coordinate has to be array'ed and re'classed), some of them contained bugs, or required the libgeos PHP extension that seems unmaintained.

@jorisvaesen I haven't started yet, when it was new, there were some issues and since then I haven't had the time and/or need.

Though I expect I'll need to do some optimizations of one project in the coming months and preloading seems to have a great effort/gain ratio.

@chrastecky
It was introduced in PHP 7.4, but lost some benefits since PHP 8 does some optimizations out of the box without the need of preloading. Although there should still be some performance improvement when done right.