It's possible to design a compiler that translates a "purely-functional" subset of PHP to another programming language that can run on a GPU, such as Futhark. I wrote a small proof-of-concept for this compiler, though it's still a work-in-progress.
For instance, a simple higher-order function could be translated to Futhark:
$higher_order_func = function($callback, $value) {
return $callback($value) * 3.0;
};
A translation of this function might look like this:
let higher-order callback value =
(callback value)*3.0
The Futhark compiler can generate CUDA, OpenCL, or sequential C source code, so it can run on either a GPU or CPU.