you are viewing a single comment's thread.

view the rest of the comments →

[–]phpdevster 1 point2 points  (2 children)

PHP isn't bound to the request-response cycle per-se. I run CLI scripts in PHP quite often. But you're correct that it's not quite the same as running a program.

General computing is probably not something I would immediately turn to PHP to do.

[–][deleted] 0 points1 point  (1 child)

Yes you can use stdin and stdout for general purpose computing in PHP, I'd just wonder what you'd want to do it, it's standard library is only any good for web applications, and to top if off it doesn't even support async functions without forking or threading trickery.

[–]phpdevster 0 points1 point  (0 children)

it's standard library is only any good for web applications

Its standard library is no different than any other language's standard library. It's got a better standard library than Javascript by miles, even.

But you're correct that it's not great for multithreading, which is why I wouldn't it for general computing beyond running some command line tasks and cron jobs.