Tips for Beginning PHP Developers
four). Separate logical blocks into paragraphs. Have you tried reading a large text written in one paragraph? Why should developers read this? The idea is the same – reading the code should be as simple and obvious as possible. For example, if in one method there is a mathematical calculation, and then the output of this calculation from the method or something else – separate it with a paragraph – this will help you immediately understand where the calculation takes place, and where the further action is already. Or another example: initializing variables and using them. It would seem, bullshit, no – not bullshit.
I hope that now many will begin to relate to their work from the position of “someone, and perhaps I myself will be dumb here, how can I make it easier?”
1. Encapsulation of methods allows you to protect the written code from unauthorized use, which in turn reduces the likelihood of errors over time.
2. Indication of the type of input and output parameters allows you to predict the behavior of the program on an intuitive level, and in addition to written comments – even without reading the logic of the implementation to understand what will happen at the input and output.
3. Comments reduce the time to understand the logic. Time is money.
4. Logically selected code paragraphs, as well as comments, speed up and simplify the understanding of the code.
In fact, these are extremely simple truths, but as a fact, they are far from being used everywhere.
Comments and criticism are welcome, because the goal is to make programming more efficient.
PHP is the language we hear the least about in the media.
Angular, React, Node.js and Python are all the rage right now. Even graduate degrees in computer science focus their efforts on Java and C.
And PHP sits in the corner and watches as all the other languages come into the limelight.
In this article, I want to find out if PHP is dead or still alive.
79% of the Internet
When someone mentions PHP, it often causes dissatisfaction with this programming language – however, according to W3Techs, it works on 79% of the Internet. Despite the bad reputation it got back in the 90s and early 2000s for being insecure, it still manages to hold on to being the most used backend language.
However, much of this success may be due to its use in WordPress. The widely popular CMS appeared in 2003, when the Internet and personal blogs began to be massively used. It has managed to surpass Google’s Blogger as a CMS.
WordPress has gone to great lengths to be incredibly simple.
According to a talk by Matt Mullenweg during his visit to Auckland, New Zealand in 2014, he mentioned that Squarespace’s Superbowl ads gave WordPress a free advertising boost as people started using WordPress as a comparison platform.
With built-in PHP in WordPress, supported by almost every shared hosting provider and still owning 61.5% of the internet, PHP as a language doesn’t seem to be going anywhere anytime soon.
Even if WordPress decides to completely switch to another language, there will still be a large number of legacy sites that will need to migrate to the new system.
PHP’s closely related relationship with WordPress has contributed to how developers have begun to consider the programming language. Most of it has to do with the development of themes and plugins for the WordPress ecosystem.
Employment prospects outside of WordPress-related activities are often associated with legacy platforms originally built in PHP. It’s not often a natural choice for startups or new business projects to put this language to potential candidates.
According to Darwin Recruitment, a UK-based recruitment agency that has released data on its recruiting services, experience with PHP recruiting is showing a decline.
However, there is a competitive trend towards more applications that require PHP. This backfire doesn’t indicate that PHP’s competitiveness for work has diminished over time.
But this is one of many agencies that may have a different trend. In contrast, worldwide interest in the search term “PHP” has been on a declining trend over the past 5 years, with China and the Philippines being the most popular search countries.
This interestingly matches up with what the number of queries in the search for “WordPress” looks like, with corresponding dips and peaks.
Blue is PHP, Red is WordPress
How is the theme market?
As PHP is linked to WordPress, themes and plugins that have emerged are becoming mainstream businesses, especially if you want to go freelancing.
ThemeForest is currently the largest WordPress-related commercial marketplace, with 114 authors currently earning over $1 million – that may seem like a lot at first glance, but it really isn’t because there are 47k active on the market. WordPress themes that are on sale. There is no easy way to determine how much product per author, but it is unlikely that their combined result is more than 10%.
While this can be a good source of passive income, it takes a lot more work to make a business out of it. However, wherever we work, it will bring us its dividends.
In 2013, hosting giant BlueHost acquired Mojo Themes and, renaming it Mojo Marketplace, they wanted to cash in on WordPress themes. However, they didn’t achieve as much success as Envato ThemeForest as most of their top themes were under a thousand.
Since PHP is an integral part of the content creation ecosystem, it is unlikely to disappear in a year or two or soon. Hosting companies also play a role as they continue to maintain WordPress as their main CMS, making it much more accessible to regular users than other server-side languages such as Java and C++.
Despite all the talk about PHP dying, it won’t happen as long as WordPress is alive and kicking. Unfortunately, many outdated PHP codes are related to old versions of WordPress that site owners haven’t updated yet.
The thing about PHP is that it also has strong non-WordPress communities like Laravel and Symfony. PHP itself is also actively maintained
In general, PHP is doing fine so far.