Hacker News new | ask | show | jobs
by fideloper 5081 days ago
I think this is a good place to enter the "Right tool for the job" argument. The right tool not being PHP.

Code here looks good on first look tho.

2 comments

Let me preface by linking to a project of mine that is very much in the "things PHP is not great at" category - https://github.com/shaneharter/PHP-Daemon

Which is entirely why I have a disclaimer up top: "Note: For many reasons PHP is not an optimal language choice for creating servers or daemons. I created this library so if you must use PHP for these things, you can do it with ease and produce great results. But if you have the choice, Java, Python, Ruby, etc, are all better suited for this."

But there are enough reasons to use PHP (and enough people doing it) that good libraries like this socket library (and the Daemon library I linked above) are a really valuable contribution to the PHP community.

Can you list a few of the "many reasons" you talk about in the disclaimer?
Could you explain why PHP is not the right tool?

I've written plenty of sockets based PHP programs that run reliably and were easy and efficient to create. I didn't come across any problems that weren't easily surmountable.

If you're going to propose an negative argument, it would be helpful to at least outline the basis on which you are making it.