Hi an “amateur” PHP developer who recently picked up frameworks like Laravel and renewed my love for web development – the frameworks make it so easy!

I keep getting pulled into the idea of learning Ruby and using Ruby on Rails. I also like the fact that the syntax is similar to JavaScript and I find myself picking up Vue.JS easier.

I wanted to ask you all, what keeps you staying with PHP, and how do you keep yourself marketable or hireable at startups?
I don’t seem to get taken seriously when I say I’m a PHP developer, anyone else feel the same?

What’s wrong with learning and knowing both?
I’m a long-time PHP developer who got hired onto a Ruby shop a bit over a year ago. There’s a lot to unpack here with your post.

I’d say that at a purely technical level, Ruby and PHP are roughly similar in many respects. I really miss being able to declare an interface or put in type restrictions on methods at a language level. I do like Ruby’s minimal syntax for methods with no arguments and its meta-programming helpers. For example, instead of creating a boiler-plate getter and setter pair of methods I can just write attr_accessor :some_name in the class definition to generate the pair of methods. I can later replace that with more fully-formed methods if I ever need more than just a pair of dumb methods. So, less type help and more boilerplate help.

The technical difference starts to widen when we consider frameworks. Laravel descends from Rails in a lot of its patterns and ideas. Being a later iteration of the same general set of ideas, it’s really a much nicer experience all around. ActiveRecord (the ORM) simply doesn’t hold a candle to Eloquent and the Fluent (old proper name) query builder. I sincerely miss Laravel.

On to the social and professional angle, I’ve run into the same thing. I long felt as if other languages were better compensated. Looking at the numbers online from sites like GlassDoor only confirmed that suspicion for me. It’s not that Ruby on Rails is well compensated. It’s that PHP in any incarnation is worse compensated. The perception from the world at large seems stuck in time with PHP4. And there is unfortunately a section of the PHP community that also seems stuck in time there, still struggling to make the transition to an OO way of thinking. I think that WordPress and other legacy PHP projects have kept people in a procedural way of thinking. But I have also noticed that developers using a Web oriented language like PHP or Ruby also tend to be better versed outside of their specific language with things like SQL, HTML, CSS, JS, HTTP, etc. because work with those languages necessarily entails “Web” development in all of its gory glory.
What keeps me moving forward isn’t a devotion to any one language. I long ago learned to regard them as simply tools, even if I feel better with some tools (PHP/Laravel) than others. Where I keep myself growing and moving forward is with studying, practicing, and challenging myself at work on skills that transcend any particular language or ecosystem. To be clear, it’s essential to be well-versed in some language and its ecosystem to be effective at writing code. But the more I learn about patterns, protocols, algorithms, architecture, and other ways of challenging my thinking, the better I get as a developer. And the best part is that I can take that knowledge with me to whatever language I happen to work in.

I liken it as the difference between learning to write in a natural language vs learning to be a good writer. You have to know a natural language and its idioms to write well in it. But knowing additional languages doesn’t mean that you’re necessarily good at writing. There are too many to learn, but I’m confident that I could learn a different one if I had cause. But learning to be good at writing applies to whether I’m doing it in English, French, Spanish, or German.

check the market. how many offers do you see for php? how many for ruby? learn both!
what keeps you staying with PHP
The reason is simple – I like it.
and how do you keep yourself marketable or hireable at startups?

That’s simple. Be a professional programmer. For a good programmer there is always a lot of opportunities, no matter what language they write.
And being a good programmer means understanding higher level paradigms, irrelevant to some particular language. Such things as common algorithms, debugging, profiling, OOP, design patterns, error handling, SQL, HTTP (for the web programming) – and dozens other disciplines! All these matters are common in all languages. After all, such a knowledge is much deeper than just some particular language’s set of syntax rules. And having such a knowledge it’s not a problem to learn another language’s syntax and use it to employ your programming skills.

If all your marketing value is “I can bang together some PHP” then it could be a problem. If it’s “I am a professional programmer who prefers PHP” then it’s all different.
One thing that makes me stay in PHP for the time being is that I am getting jobs from companies that have long running products and are not WordPress.

The thing that I like technically compared to other interpreted languages (ruby, JavaScript, python,…) is the fact that PHP now functions almost like C#/Java in its OOP concepts and that’s something very valuable when you are building or maintaining large scale applications. You can use or replicate industry standard design patterns and code practices very easy from Java/C#, which have been used extensively in large applications.

To be marketable you need to prove your design and implementation skills, not so much that you can program (you should be able to do that if you want jobs). Being able to work in teams and find efficient solutions to problems consistently is valued more.

It’s true that it’s cool to hate PHP even now (it’s declining fortunately) but most of the times it’s from people that are somewhat insecure about their programming skills or life in general. If you prove your technical knowledge typically they tend to stop.

I don’t seem to get taken seriously when I say I’m a PHP developer, anyone else feel the same?
I know the feeling, PHP developers also often get underpaid compared to other languages. It’s still a popular language though and it’s easy to get a job with PHP. I wouldn’t go for Ruby, it’s not really a popular language anymore, I would rather go for Python.

source