Experimenting with PHP

Reading Time: 2 minutes

I have been following courses for three years now. Within the last week or two I decided to start experimenting with PHP using my website as a guinea pig. I have already converted a few pages to PHP. Some of them use for each loops and others use the include functionality. My aim is to practice the skills that I have studied, within a production environment.

Some of the tasks are repetitive. This isn’t a bad thing. It builds habit and understanding. By doing something frequently enough the pattern gets burned into my subconscious. When that’s done I will spot errors automatically, and if I get an error message I will know what it means.

One error message I got was $article was not found and after seeing it three or four times, I know to check that I have included the array data php file. Problem fixed, time to move on to the next page.

What I enjoy about PHP so far is that it’s intuitive. Error messages are from the line beneath the line where the error is. This means that bugs are fixed within seconds not minutes.

Another aspect that I really appreciate about foreach loops is that they’re direct. With Javascript you need to understand the DOM, parent elements, children etc to get things to work. With PHP, so far, I work directly with the elements that I’m manipulating.

If I tried to do my instagram clone now I would find it much easier to do. I progressed.

Looking forward learning to use PHP directly, means that when I use WordPress, Laravel and other solutions I will understand what I am doing, and what is going wrong, if things do not work.

For now I am happy to rework my website. I will practice new skills. The website will benefit.

Similar Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.