Seems like that requires some sort of ad-hoc PHP extension. These are not in the standard PHP distribution? I would not want to rely on some random PHP extension that maintained by a single guy for anything production grade. Compare that to something like tensorflow thats backed by a HUGE community of maintainers.
- https://www.php.net/manual/en/book.ffi.php
While I'm at it:
- https://pecl.php.net/package/tensor
- https://rubixml.com/
- https://github.com/RubixML/Tensor