Introduction to PHP
Gift Segun Adesigbin
Posted on June 11, 2023
If you started your career in the tech space in the past few years as a programmer, you'd have come across a lot of programming languages, C, C++, C#, Java, Python, JavaScript, PHP, Ruby, Golang, Swift, Kotlin and the likes, and if you were like me, you'd have probably been confused as to which of these programming languages to learn
but one thing I'm sure of is that PHP might not have been on your mind, Why? because there are loads of people out there on Twitter, Facebook, YouTube, and other social media channels claiming that PHP is "dead", and I honestly believed them for a while until Segun opened my eyes, the funny thing is that most of them saying PHP is dead have not used PHP before.
What is PHP?
PHP which initially stood for Personal Home Page and is now known as Hypertext Processor is a server-side scripting language which was initially created in 1994 by Rasmus Lerdorf, subsequent versions have been released since then, and the latest at the time of writing is PHP 8.2. According to this article by W3Techs, PHP is used by 77.4% of all websites whose server-side language is known, which proves that PHP isn't dead.
Popular sites like Facebook, WordPress, Yahoo, MailChimp, Wikipedia, Slack, Tumblr etc, all use PHP as their server-side language. Check out this article by Mozilla Docs for the meaning of server-side.
Basic Syntax
The PHP syntax is similar to programming languages like JavaScript, C and Java, therefore if you have any experience in those languages, PHP would be relatively easier for you to learn, Here is an example
<?php
echo "Hello; world";
?>
The code above is a simple PHP program that displays the word " Hello; world ", the opening and closing tags "<?php" and "?>" must be included for the code to run, and the "echo" word there is a PHP keyword that is used to output a string or a variable. I'd be talking about other basic syntax in my subsequent articles
Conclusion
PHP is still a really popular programming language to learn, although it has its downsides just like every other programming language out there, it's also important to note that there is no perfect programming language to learn as a beginner, you have to choose one to learn based on your interest.
Until next time, PEACE.
Posted on June 11, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.