Share via:

How long will it take to learn PHP?

How long will it take to learn PHP


Edited: 2019-09-30 18:03

wow PHP, server-sided scripting language.

Question: How long will it take to learn PHP?

How long it will take to learn PHP, or just about any programming language, depends on lots of factors. If you have not been coding or programming before, then it will generally be harder for you, than it is for someone who has experience with another languages.

PHP was one of the first languages I learned, and also one of the languages I am best at. When I approach a new language today, I will generally start by solving a problem using the language. This process can take anywhere from a few hours to days. I start by reading references and looking at tutorials on how to do specific things required for the problem I am trying to solve. It is really not that difficult.

When I started writing bash scripts, I had useful scripts within mere hours. The same happened when I started learning Python. I consider both languages as something I "have learned", even though I do not master every single aspect or feature in them.

There are also things in PHP I still have not learned, even though I have been coding PHP scripts for years.

PHP is very powerful, because it allows you to work with all kinds of data. You can even do video and image editing in PHP! It is widely used in combination with HTML, CSS and JavaScript, but can also be used without any knowledge of those. One way you might use PHP outside of the web is for CLI (Command-Line Interface) scripting.

How long will it take to learn?

If you are motivated, then it really should not take that long, and I would guess you could get a long way in just a weak or a months time, just from reading references and tutorials.

If you got no programming experience at all, then it might take a bit longer.

We also have to recognize our limits as humans. We tend to get frustrated and give up, at least in the beginning. But, if we keep trying again and again, we will likely eventually learn even the subjects we think hardest.

Just keep trying, and do not limit yourself to one language or technology.

Is PHP a good language to learn?

It is actually not so much about the language, since the programming theory will be shared across languages. But, considering the easy syntax in PHP, which is very similar to languages such as JavaScript, bash and Python, I would say that PHP is a very good choice. It is probably easier than the other languages I mentioned.

It gives you a very solid "base" to work with, and it will be easier to pick up other languages later. PHP is very similar to JavaScript in some ways, so in general, if you have learned some basic PHP coding skills, JavaScript will be much easier to understand as well. The same could probably be said about C++.

And finally, do not simply limit yourself to one language. Sometimes you might want to create a program in C++, other times you might want to do it in pure PHP.

Unless you are very motivated and disciplined, I also would not waste my time trying to learn multiple languages at the same time, since it can be a great distraction. There is also great value in just specializing in a single language. But, you will almost certainly start to experiment with other languages at some point, and before you know it, you will have learned a new language. PHP is very easy to learn.

I suggest you try learning some basics, like reading from- and writing to files, as well as doing loops, if statements and functions, and also, you might want to learn about Object Orientated Programming when you have learned the basics. This is tools that are similarly used in many languages, only with differences in syntax.

Do you know x language or api

This is why I hate it when potential employers ask about my experience with x language or API, because the question is rather meaningless. It does not give any reliable indication of programming skills.

Just about any language or API can be learned fairly quickly if you got past experience. What employers might instead want to ask is about familiarity with OOP, design patterns and coding best-practices or principles such as DRY.

Maybe it is not a good idea to mention the actual design-patterns, but rather look at peoples existing code. Then you can always teach them the theory, because there are a lot of programmers who are self-thought, and many of us kinda learned to code first, and then the theory afterwards.

The above might not apply if they are just looking for a script-kiddie to write a few procedural scripts. But, it almost certainly will cause problems for them down the road if they do not follow best-practices, or have a good application structure.