4 ms·
Writing a webserver in pure PHP
- __Joker 12y agoCurious : Why PHP can't handle long running processes ?
- potato_on_cat 12y agoIt absolutely can. I just think you gonna run into some memory leaks or other problems, I just don't trust PHP yet handling stable long running processes. But please correct if im wrong would love to read some experiences with that topic :)
- cabirum 12y agoPrior to 5.3 (really long time ago), GC could not collect self-referencing objects. http://php.net/manual/en/features.gc.performance-considerations.php http://php.net/manual/en/features.gc.performance-considerati... After circular-reference cleanup has been implemented, php should work no different than any ohter GC language. I personally had some scrapers running for days with no issues.
- cabirum 12y agowhy not php -S 127.0.0.1:8000 someentrypoint.php ?
- potato_on_cat 12y agoBecause I try to explain how a Webserver works for beginners. Building one in the language people are familier with is in my point of view the easiest way :)