DEV Community

Discussion on: I am a full-time freelancer aged 21. I work mostly in PHP and React. Last year I made approximately $75,000 in revenue. AMA!

Collapse
 
aviaryan profile image
Avi Aryan • Edited

What do you think about PHP? The general dev sentiment has always been negative but is it a good idea to learn it just for freelancing? I am also a freelancer, majoring in JS|Python but I see a lot of PHP projects and wonder if I should learn PHP projects to be able to take them.

My major concern is this: Suppose if I learn PHP, start following good dev practices, learn composer, Laravel (IDK!) etc, will I be able to do client work in the same?

I fear this because I believe most PHP work these days is big corp's legacy codebase so it is ought to be complicated and of very large scale. Will self-learning PHP be sufficient to take those projects?

Thanks.

Collapse
 
pretzelhands profile image
pretzelhands

I like to joke that I have severe Stockholm syndrome for the language, and that's true in a way. There's some things about PHP that very much upset me (e.g. see phpsadness.com). But especially since PHP 7 some nice things have happened. And I am very much convinced that the language can be used just as well as anything else. It has a few quirky approaches to development, but you can shoot yourself in the foot with Java just as much as you can with PHP. 😁

Further, in my opinion, there's enough space to pick out just the parts you like with PHP. It's still a very big thing in eCommerce (see: Magento, Shopware, WooCommerce, ...) and that's actually what I'm currently working on. On the other hand there's still greenfield projects being built in Laravel or Symfony, even if it's not the "cool" stack. And then there's maintenance of legacy applications, which can be both fun and terrifying. So whatever you like doing, I think there'll be work for you.

As for self-learning: My PHP knowledge is mostly from self-teaching and reading documentation. I watched a few screencasts here and there to supplement things I was totally stuck on and the rest was experimenting. So I think that if you take some time to learn the language and learn it well, you'll have no problems with maintaining legacy code. 🤓

I can suggest the following approach if you're interested in it:

  • Learn about the language and how things work (laracasts.com/skills/php)
  • Learn about Symfony's components. They underpin a big part of the ecosystem (symfony.com/)
  • Grab the documentation of various frameworks and see which you like best (Laravel, Symfony Framework, heck even Wordpress). Learn the basics.
  • Build a few small side projects and see how you like the experience.

After that you should have a good grasp on the language and be able to tackle medium-sized projects without too much trouble. Everything else comes from experience. And if you need help, I'm happy to provide it. ✨

Collapse
 
aviaryan profile image
Avi Aryan

Thanks, Richard, this was very helpful. Interestingly, PHP was one of the first languages I learned when starting my programming journey but soon abandoned it. 😂

This will be very helpful for starting again. Thanks for posting it.