| | | |

Should I Learn PHP?


I will admit it: I am a little scared to write and publish this post. Sharing opinions on programming languages tends to invite strong opinions and even conflict. Allow me to explain.

About a month ago, I inadvertently started two language wars on Quora by sharing my opinions on the PHP programming language and jQuery, the most popular JavaScript library. The question about PHP that I attempted to answer was, “Why are people still learning PHP?” There are other similar questions circulating, such as “Is PHP dead?” and “Should I learn PHP?”

Angry ManIn my answer, I dared to suggest that even though I use PHP in my current role, it is in decline in some areas of the United States and not always the #1 choice for new projects. The suggestion that alternatives such as node.js (server-side JavaScript) are being chosen over PHP invited more than a few nasty comments. Web developers are an opinionated bunch, and if you give your opinion on a programming language, the sparks will fly!

That said, I think it’s important not to shy away from these discussions. It takes a significant amount of time and effort to learn a programming language well, so we do need to determine if it is worth our time to go beyond the basics when learning a new technical skill. In this article, I will attempt to give you the background information you need and discuss the trends I am seeing so that you can make an informed decision about whether or not you should learn PHP.

What is PHP?

PHP stands for PHP Hypertext Preprocessor and is a stable programming language that has been around since 1995. It is a server-side language that powers as much as 80% of the web. Yes, that’s correct: up to 80% of the back end all websites are built with PHP. Because PHP is a server-side language (also called a backend language), you need to be connected to a web server in order to learn it. Unlike HTML, CSS and JavaScript which can run in your browser, you must be connect to a server to execute your PHP code.

Once you have an understanding of how to structure a webpage with HTML and add some basic styling with CSS, you’re ready to learn PHP. When you’re starting out, you’ll learn how to embed PHP code into HTML and how the PHP programming language works with HTML.

Reasons to Learn PHP

The two major reasons why PHP is a good programming language to learn is that it is one of the easier languages for first-time programmers to learn and the demand for PHP developers is currently high. There are ample opportunities at both stable companies and freelance gigs for PHP developers.

PHP Is Currently in Demand

If you know PHP, there are currently a number of full-time and freelance gigs that will be available to you. PHP is used by businesses, universities, small business owners, and bloggers. As I mentioned above, PHP currently powers up to 80% of the web, and all of that server-side code needs to be maintained.

If you crave a flexible lifestyle and would prefer not to work for a company, you can easily carve our a freelance career for yourself customizing WordPress and Drupal websites for individuals, bloggers, and small business owners. There is tremendous demand for these types of freelance jobs in our gig economy, and you can find opportunities through places like Upwork, Fivver, Craigslist, and countless other job boards.

PHP Is a Good Choice for First-Time Programmers

If you have no prior programming experience, then PHP is a good first language to learn. It does require you to install and set up your own web server, but a decent course on PHP will walk you through that process.

Some will argue that JavaScript is a good first language to learn because minimal set up is required, but compared to JavaScript, PHP is an easier language for first-time programmers to learn. The JavaScript programming language is continually evolving, and developers and engineers are continually extending the language, and aspiring web developers often have difficulty keeping up with the continual changes to the language. In addition, JavaScript underwent a rather significant re-write with ES6 (also called ECMAScript2015) a few years ago, so new programmers, once they are comfortable with JavaScript basics, then have to learn an entirely new syntax. When I had first started learning JavaScript, I struggled considerably and had better luck learning introductory programming with PHP.

A community of web developersIn contrast to JavaScript, PHP is a very stable language, and with the right course, a beginner will not have a problem learning the basics of PHP programming. The global community for PHP developers is robust and widespread, so there is a lot of support for the language. It is popular enough that if you run into a challenge that you’re having difficulty solving, chances are that another web developer has had the same issue and written about it. This is an important consideration when you are getting started. Working with a popular programming language means you will find answers to issues you encounter. In addition, the PHP Manual is a great place to look for answers when you encounter difficult challenges.

As you learn PHP, you will learn all about how the web works on the back end. As an aspiring web developer, it is immensely helpful for you to know how all the different parts of the web work together, and learning PHP will give you that knowledge. Another skill that you will likely learn with PHP is MySQL, which is an extremely popular database. Developers who know how to write proper SQL queries to retrieve information from databases are continually in demand.

Reasons to Learn A Different Programming Language

I continue to think that PHP is an excellent first programming language to learn, but there are a couple of trends that you should take into consideration before diving in.

PHP May Be on the Decline in Some Parts of the U.S.

Prior demand for PHP in some U.S. regions is starting to decline somewhat now that server-side JavaScript (node.js) and Python are on the rise. PHP used to be THE choice for server-side web programming, but now it is competing with Node.js and Python. This is a trend that has been discussed by some instructors from the Udemy courses I have piloted in JavaScript. The instructors are careful to say that there is nothing wrong with learning PHP but advise class participants to eventually learn server-side JavaScript, too.

PHP Gigs May Not Pay As Well

According to the 2018 Stack Overflow Developer Survey, PHP did not make the list for programming languages that are associate with the highest salaries in the United States or abroad. So, if earning a lot of money is your main concern, you will likely want to learn a language like Python, JavaScript or Java either before or after learning PHP. Even so, PHP still remains a great choice for those who crave a flexible lifestyle and want to build a freelance career customizing content management systems such as WordPress and Drupal for clients.

Where You Can Learn PHP

The best course I have found to date on PHP is Edwin Diaz’s PHP for Beginners. In all fairness, the course is so robust that I haven’t even finished it yet! It is a monster, 36-hour course that starts out with PHP basics and progresses to SQL database programming and building a custom content management system from scratch. In my current role, I work with PHP files on our web development server and credit Edwin’s course for helping me further solidify the basics of the PHP programming. I have also attempted to learn PHP from books but quickly got bored with the number of forms that I had to type and re-type. Edwin’s class is much more exciting, and at the end of it, you will know how to build a custom content management system for bloggers and be able to customize WordPress and Drupal websites. You can check the course out now or wait a couple of months until I publish my big review on Edwin’s PHP course that is available on Udemy.

I hope this article has helped you make an informed decision about whether you should start learning PHP. If you have any questions, please feel free to contact me or to leave a comment, and I will get back to you shortly.

Similar Posts


  1. Laura,

    Your article was great. I have been doing freelance digital marketing for the last two years, and I’ve considered learning a programming language to give a greater competitive edge.

    When I’ve started looking into programming languages, I’ve always been confused about what’s what. It’s hard to know what’s most important, what’s in the highest demand, and what will be most stable because the technology space is changing so fast.

    You’re article and the stats you included really help me to think more about if I want to learn a programming language at all, and which to consider. You mentioned Python, but I’m unsure how popular the use of the programming language is. Do you have any ideas on that? Is it a high demand programming language?

    1. Hi Tiffany,

      Thank you — I’m glad you liked this post and find it helpful. To answer your question, yes, Python is definitely in high demand, and we’re seeing it starting to surpass PHP. It is a great all-purpose language that can handle anything from web development to server automation to data science. If you’re in an area of marketing that is data-driven, Python would be a great language for you to learn. Like PHP, it’s an ideal programming language to start with because its syntax is closer to English compared to other programming languages.

      If you’re looking for a course on Python to help you get started, I’m more than happy to help. I hope you enjoy learning Python and that it serves you well in your career.

  2. Hi Laura,

    This was an extremely informative article – thanks for writing so clearly and concisely! I have a question: My 11 year old seems to have a good head for maths and computers. We’re thinking about his learning a programming language – would you recommend he learn PHP or Python? Or perhaps there is another language more geared towards kids that will help them build a solid programming foundation in 10 years’ time?

    Thanks, and all the best,


    1. Thanks for the kind words, Norman! I’m glad you found this article informative.

      To answer your question, Python is an excellent language for an 11-year-old to learn. It’s a very popular teaching language because the syntax is closer to English than most programming languages. Python is also growing in popularity, which is a trend that I expect to continue, considering how often it is used in data science, a field that is becoming increasingly important. There are some great books out there specifically on Python for Kids, so you can check those out. There is also a platform called Scratch, which teaches kids the basics of programming.

      I hope this helps, but if you need additional suggestions, please feel free to get in touch with me.

    2. Hi Norman,
      PHP is very much a ‘business’ sort of language in that there is a lot of setup / framework that comes along with it, and it’s really geared towards building website backends – quite boring stuff, in other words.
      To foster an interest in programming and mathematics it’s far more important that one focuses on learning algorithms and data structures (part of algorithms) – those are the fun and rewarding parts of programming that’ll keep you interested and plant the seeds of curiosity.
      As such, I would strongly recommend against something like PHP if your focus is on intellectual enrichment and not (immediately) on getting a job. He should be learning something like C or Java. Neither of these are beyond a child – I learned C when I was about 14, after learning BASIC. Then, after a few months tackling challenges like those on Hackerrank, do a (free) course like “NAND to Tetris” to really pique his interest in computers.

  3. I normally wouldn’t be so engaged by any articles pertaining to this subject, but yours grabbed my attention. It was like a great dessert crying out to me to eat it. This is good content.

  4. I believe that programming languages are tools to get things done, and I really do not understand the way of thinking of the developers who seem to get offended if someone said something about a programming language, at the end one should choose the right tool because it is the tool that gets the job, this specific job, done. Not because I like it and have its logo stickers all over my laptop. And at the end, every programming language one learns opens more opportunities for potential work.

    1. I agree with you that programming languages are tools and it’s a matter of picking the right tool for the job. That said, a number of web developers and software engineers have strong opinions on these topics, so while I try to navigate these online conversations with some care, I invariably ruffle some feathers when I take a stand. Thanks for your comment, and best wishes.

  5. Thank you for the excellent article, Laura. I could never understand why people criticize PHP so much. I’m an instructor and teach PHP/MySQL for the backend web development and for the front end we teach JavaScript/jQuery. I’ve investigated many of the new libraries out there like Node.js (for backend) as well Angular, Vue, and React for front end and, although they have tremendous cachet at the moment, they are not really appropriate for most websites. They are targeted at single page web apps.

    We use Python for our beginner programming class, as the braces and semicolons tend to trip up newbies, but all the languages that have achieved dominance in actual applications use syntax derived from C (eg., C++, C#, Java, JavaScript, and PHP) and I think that says a lot about that syntax. It’s not great for teaching beginners, but it is more “expert friendly”.

    Whenever I see a new language appear, I have to ask myself, “What does this language really do better than an existing language?” The answer often seems to be, “It gratifies the ego of the person who developed it.”

    1. Thanks so much for your thoughtful comment, and I’m glad you enjoyed the article. When it comes to teaching first-time programmers, I have come to appreciate that there is no one perfect choice. You can teach JavaScript because you can run it in your console without a lot of complicated setup, but the language has gone through many changes and still has its odd quirks. You can teach Python, but yes, the strict syntax can be difficult for those who do not have experience with programming. I keep coming back to Python and Java since both are popular languages that can easily land a diligent learner a job. That said, PHP is a stable language and is the powerhouse behind WordPress, which makes it a highly relevant language. Good luck with your classes, and thanks again for your comment.

  6. Great post! I’ve been using PHP for over a decade and I agree that it’s a great language. I’ve recently been hearing about server-side JavaScript and wasn’t even sure if it was a real thing. You gave me a nice, quick overview on web languages, answering some questions that I’ve been struggling with – trying to decide where to put my energy.

    I completely agree that PHP is an excellent tool for freelancers and free spirits. I’m going to have to check out node.js and Python. Thanks again!

    1. You’re most welcome. If you need suggestions for a course to get started in node.js or Python, please feel free to let me know. If you have an idea of what you’d like to build or what kind of work you’d like to do, that could influence your choice since Python and node.js, while both back-end technologies, are used for different things. Python is a general-purpose programming language that is also used in back-end web development whereas node.js is back-end JavaScript and is a good choice for fast applications, particularly those driven by user events.

  7. I feel you are simplifying the ecosystem in which php holds value. With frameworks live Laravel and new services like Laravel Vapor you can build massively scalable and incredibly performant and beautifully architected PHP applications that solve incredibly complex business challenges.

    1. I agree: PHP is a perfectly valid language for web development, and using it with Laravel can be applied to many business solutions. But I would be remiss if I didn’t discuss the trend that I see, which is that PHP is becoming less relevant. I am also seeing salaries for PHP skills decrease compared to other technologies like C#, node.js, etc. That said, this is the trend that I see where I live. It could be different in other geographic locations.

      I also want to encourage everyone to think about programming languages and frameworks as tools rather than get involved in language wars. At the end of the day, developers need to evaluate whether or not a specific language or a tool will help them complete a project or solve a problem. If PHP can do that and you know the language, then by all means use it.

      Since there are so many languages, frameworks, and tools out there, however, I do think that web developers need to be strategic about which skills to learn and focus on.

Leave a Reply

Your email address will not be published. Required fields are marked *