Hacker News new | ask | show | jobs
by rogem002 2445 days ago
Recently I was asked to help out with a PHP project for work, I made the switch to rails almost a decade ago & haven’t looked back since so I was excited to see how PHP felt.

I was fairly impressed with how easy it was to jump back to PHP, the documentation is full of examples, there is composer for package management and it has a strong community who meets up regularly.

1 comments

Exactly. Composer is key here. Pear just didn't work well as a third party bolt on. As a result monolithic frameworks such as Zend Framework were born, along with Blogs, come CMS come frameworks. And Rails clones. It's still hard to navigate the 3rd party landscape, but integration is so much easier.

My main gripe with Php is editor support. Jumping around a code base is hard when you introduce slightly abstract class loading. The more 'typed' the language is, I guess makes editor help easier, with auto completion etc. But that is a disjoint or me.

Editor support for functions is useful. I'm slightly embarassed still at the frequency of my manual lookups.

Class autoloading is nice, but functions are left by the wayside on the autoloading front, which is a bit gnarly.

The language is actually quite quick to learn, and you can hold a lot in your head. You can do a lot just with arrays and foreachs, without having to reach into convenience functions.

Most of my time is laboured over other frameworks and interoperability, rather than any really worry about Php itself.

> My main gripe with Php is editor support. Jumping around a code base is hard when you introduce slightly abstract class loading. The more 'typed' the language is, I guess makes editor help easier, with auto completion etc. But that is a disjoint or me.

If you are comfortable with IDEs, I strongly recommend PHPStorm. It is the one piece of software that I happily pay for each year. It increases my productivity and quality control to such degree that I wouldn't want to write PHP code without it.

> Editor support for functions is useful. I'm slightly embarassed still at the frequency of my manual lookups.

I've been writing PHP for 10 years now, and I still have to look up just about every function. I only recently discovered that PHPStorm supports displaying the PHP manual as you type, but that it is disabled by default.