You could make asynchronous servers using socket_select(), which was added in PHP 4.1.
https://www.php.net/manual/en/function.socket-select.php
There was also a third party extension that added threads to PHP 15 years ago, although it was buggy.
Reminds me of ReactPHP (no, not that React) that allowed you to do non-blocking I/O in PHP back in like 2012-2013 sometime. Maybe that's the library you're referring to actually?
Seems they still have the docs up: https://www.php.net/manual/en/book.pthreads.php
I don't know enough about PHP to understand this comment. Can you elaborate?
we have a linter that bitches anytime anyone uses php's empty. In fact, php has tons of these weird behaviours mostly masaradng as trying to be helpful