Some PHP fun-facts
Solomon Iniodu
Remote Telesales & Sales Performance Leader | AWS Cloud Practitioner | Data-Driven Business Growth | Cloud Solutions & Cost Optimization Enthusiast | AI-Powered Sales Strategy
Overview
The term PHP is an acronym for Hypertext Preprocessor. PHP is a server-side scripting language designed specifically for web development. It is open-source which means it is free to download and use. It is straightforward to learn and use. The files have the extension “.php”.?
Rasmus Lerdorf inspired the first version of PHP and participated in the later versions. It is an interpreted language and it does not require a compiler.?
Popular websites like Facebook, Yahoo, Wikipedia, Slack, Etsy, Tumblr,
MailChimp etc, are developed using PHP.
These are some striking facts I recently learned about PHP.
(1) String concatenation - This entails a process used in merging two strings in an output. It uses a period (.) in getting this done.
Example;
echo "one" . "two";
//This will ouput thus;
onetwo
However, if we need to separate the two strings, all that is required is to reserve space just before the first string's closing quotation. See below;
echo "one " . "two";
//This will output thus;
one two
(2) Snake case - This is simply a convention of using an underscore (_) between variable names with two or more words.
Example;
$my_name = "Solomon";
$favorite_food = "Spaghetti bolognese";
$my_favorite_language = "PHP";
(3) Sigil - The dollar sign ($) that proceeds PHP variable name.
Example;
$int
$my_var
$age