It's not a language feature but a runtime feature. There's no reason why JS or Python or Java could not be run like that.
I wouldn’t recommend them, though.
edit: indeed https://frankenphp.dev/docs/classic/ indicates normal runner capability similar to Apache.