<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abdulkareem Mustopha</title>
    <description>The latest articles on DEV Community by Abdulkareem Mustopha (@aphatheology).</description>
    <link>https://dev.to/aphatheology</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F171621%2F19544570-a4d1-4c27-a143-1ccad3a47788.PNG</url>
      <title>DEV Community: Abdulkareem Mustopha</title>
      <link>https://dev.to/aphatheology</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aphatheology"/>
    <language>en</language>
    <item>
      <title>HTML &amp; CSS Validator: A way to ensure writing clean markup codes</title>
      <dc:creator>Abdulkareem Mustopha</dc:creator>
      <pubDate>Mon, 16 May 2022 08:29:55 +0000</pubDate>
      <link>https://dev.to/aphatheology/html-css-validator-a-way-to-ensure-writing-clean-markup-codes-174g</link>
      <guid>https://dev.to/aphatheology/html-css-validator-a-way-to-ensure-writing-clean-markup-codes-174g</guid>
      <description>&lt;p&gt;One of the most repeated advice for beginners is to write clean codes that will be easy to understand for other developers. This is quite hard for a beginner as one is always focus on getting things done and working.&lt;/p&gt;

&lt;p&gt;Yes, the code will eventually work, but if it breaks down, it will be hard to fix, and an external helping hand will have a nightmare fixing it, due to the lack of structure of the codebase.&lt;/p&gt;

&lt;p&gt;For HTML and CSS, Google Style Guide is quite popular and recommended while Airbnb style guide is usually recommended for writing cleaner JavaScript codes. &lt;em&gt;Links to both style guide attached at the end of the article.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;One thing is common with all Style Guide; if not followed, it does not have an immediate effect on the codebase. Though one might experience a breakdown in the future which could have been avoided if a style guide was followed.&lt;/p&gt;

&lt;p&gt;Among the issues with following a style guide is one won't know which part the style guide is not followed since the code will still work perfectly, this make it hard to trace such minor code practice.&lt;/p&gt;

&lt;p&gt;This is worse with HTML, because it does not give warning or error message, which is part of its limitation. This is where a validator comes in.&lt;/p&gt;

&lt;p&gt;Example of HTML File checked with error&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8gBYI8w_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bvk7b9sleoc2c1f45665.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8gBYI8w_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bvk7b9sleoc2c1f45665.png" alt="HTML File checked with error" width="546" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above is the error given from one of my project which is already on production and being used. But due to HTML limitations, no warning or error message given to call my attention to the typo error.&lt;/p&gt;

&lt;p&gt;For HTML and CSS, the World Wide Web Consortium (W3C) have a validator that allows user to paste their HTML Codes directly, or upload their HTML or CSS files or paste their file URL and then validate it.&lt;/p&gt;

&lt;h2&gt;
  
  
  HTML VALIDATOR
&lt;/h2&gt;

&lt;p&gt;To validate your HTML codes/files (or other Markup files), use &lt;a href="https://validator.w3.org/"&gt;W3C HTML Validator&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Upload your html file or paste your codes or use the file url
&lt;/h3&gt;

&lt;p&gt;Upload your HTML File&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v3fP5Hmv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pbri9p61k33jucepxnoh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v3fP5Hmv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pbri9p61k33jucepxnoh.png" alt="Upload HTML File" width="880" height="271"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Click on the Check button.
&lt;/h3&gt;

&lt;p&gt;Example of HTML File checked without any error&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Mt34UGwH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bllx7i1i7j03ynynhnds.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Mt34UGwH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bllx7i1i7j03ynynhnds.png" alt="HTML File checked without any error" width="880" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Example of HTML File checked with error&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8gBYI8w_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bvk7b9sleoc2c1f45665.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8gBYI8w_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bvk7b9sleoc2c1f45665.png" alt="HTML File checked with error" width="546" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Go ahead to fix the error(s) if there is anyone reported.
&lt;/h3&gt;




&lt;h2&gt;
  
  
  CSS VALIDATOR
&lt;/h2&gt;

&lt;p&gt;To validate your CSS codes/files, use &lt;a href="https://jigsaw.w3.org/css-validator/"&gt;W3C CSS Validator&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Upload your CSS file or paste your codes or use the file url
&lt;/h3&gt;

&lt;p&gt;Upload your CSS File&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lBSyrCAn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gkzdcvvn32a4hefvrjd8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lBSyrCAn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gkzdcvvn32a4hefvrjd8.png" alt="Upload CSS File" width="880" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Click on the Check button.
&lt;/h3&gt;

&lt;p&gt;Example of a CSS File validated  with no error but a minor warning&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yvvwuO5l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jtltcdvvs5z93q5g69d8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yvvwuO5l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jtltcdvvs5z93q5g69d8.png" alt="CSS File validated  with no error but a minor warning" width="880" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Example of CSS File validated without any error or warning&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NARNyjbl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ag9e0ppn9erl5wgak4b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NARNyjbl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ag9e0ppn9erl5wgak4b.png" alt="CSS File validated without any error or warning" width="880" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If your CSS File or codes passed the validator process, a W3C tag is generated which one can place on their website or project, to show their actually put an effort in writing cleaner CSS Codes.&lt;/p&gt;




&lt;p&gt;Google HTML and CSS Style Guide - &lt;a href="https://google.github.io/styleguide/htmlcssguide.html"&gt;https://google.github.io/styleguide/htmlcssguide.html&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Airbnb JavaScript Style Guide - &lt;a href="https://github.com/airbnb/javascript"&gt;https://github.com/airbnb/javascript&lt;/a&gt; 
&lt;/h2&gt;

&lt;p&gt;I will love to hear your feedback after validating any of your HTML or CSS codes.&lt;br&gt;
Thanks for reading&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Module 3 of #100DaysOfPHP: Decision Making in PHP</title>
      <dc:creator>Abdulkareem Mustopha</dc:creator>
      <pubDate>Sun, 09 Jun 2019 13:30:43 +0000</pubDate>
      <link>https://dev.to/aphatheology/module-3-of-100daysofphp-decision-making-in-php-41jl</link>
      <guid>https://dev.to/aphatheology/module-3-of-100daysofphp-decision-making-in-php-41jl</guid>
      <description>&lt;p&gt;PHP allows us to perform actions based on some type of conditions that may be logical or comparative. Based on the result of these conditions i.e., either TRUE or FALSE, an action would be performed as asked by the user. It’s just like a two-way path. If you want something then go this way or else turn that way. &lt;/p&gt;

&lt;p&gt;To use this feature, PHP provides us with four conditional statements: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;if statement &lt;/li&gt;
&lt;li&gt;if…else statement &lt;/li&gt;
&lt;li&gt;if…elseif…else statement &lt;/li&gt;
&lt;li&gt;switch statement &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's look at how each conditional statements work &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. if Statement&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This statement allows us to set a condition. On being TRUE, the following block of code enclosed within the if clause will be executed. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
if (condition){ // if TRUE then execute this code }&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&amp;lt;?php &lt;br&gt;
$x = 12; &lt;br&gt;
if ( $x &amp;gt; 0) &lt;br&gt;
{ echo "The number is positive" ; } ?&amp;gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
The number is positive &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. if…else Statement&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We understood that if a condition will hold i.e., TRUE, then the block of code within if will be executed. But what if the condition is not TRUE and we want to perform an action? This is where else comes into play. If a condition is TRUE then if block gets executed, otherwise else block gets executed. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
if (condition) &lt;br&gt;
{ // if TRUE then execute this code } &lt;br&gt;
else{ // if FALSE then execute this code&lt;br&gt;
} &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
 &amp;lt;?php &lt;br&gt;
$x = -12; &lt;br&gt;
if ( $x &amp;gt; 0) &lt;br&gt;
{ echo "The number is positive" ; }&lt;br&gt;
else{ echo "The number is negative" ; } &lt;br&gt;
?&amp;gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
The number is negative &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. if…elseif…else Statement&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This allows us to use multiple if…else statments. We use this when there are multiple conditions of TRUE cases. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
if (condition) { // if TRUE then execute this code } &lt;br&gt;
elseif { // if TRUE then execute this code } &lt;br&gt;
elseif { // if TRUE then execute this code } &lt;br&gt;
else { // if FALSE then execute this code } &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&amp;lt;?php &lt;br&gt;
$x = "August" ; &lt;br&gt;
if ( $x == "January" ) &lt;br&gt;
{ echo "Happy Republic Day" ; } &lt;br&gt;
elseif ( $x == "August" ) &lt;br&gt;
{ echo "Happy Independence Day!!!" ; } &lt;br&gt;
else{ echo "Nothing to show" ; } ?&amp;gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
Happy Independence Day!!!&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. Switch Case Statement&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The switch statement is used to perform different actions based on different conditions. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
switch (n ) { case label1: code to be executed if n=label1; break; &lt;br&gt;
case label2: code to be executed if n=label2; break; &lt;br&gt;
case label3: code to be executed if n=label3; break; &lt;br&gt;
… &lt;br&gt;
default: code to be executed if n is different from all labels; } &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&amp;lt;?php &lt;br&gt;
$favcolor = “red”; &lt;br&gt;
switch ($favcolor) { case “red”: echo “Your favorite color is red!”; break; &lt;br&gt;
case “blue”: echo “Your favorite color is blue!”; break; &lt;br&gt;
case “green”: echo “Your favorite color is green!”; break; &lt;br&gt;
default: echo “Your favorite color is neither red, blue, nor green!”; } &lt;br&gt;
?&amp;gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Jump Statements&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Break Statement&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In PHP or any programming language, if any specific condition is true, then the break statement is used to stop the program execution immediately and exit the program. &lt;/p&gt;

&lt;p&gt;The loop or switch statement use break statement in PHP &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&amp;lt;?php for($i=1; $i&amp;lt;=10;$i++) if($i==6){ break; } echo $i, “&lt;br&gt;”; } &lt;br&gt;
?&amp;gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Continue Statement&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;PHP or any programming language, if any specific condition is true, then continue statement skip the program execution and go to the next program. Example &amp;lt;?php for ($i=1&amp;lt;=10;$i++){ if($i==6){ continue; } echo $i, “&lt;br&gt;” ; }&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Exit Statement&lt;/strong&gt;###
&lt;/h3&gt;

&lt;p&gt;The exit() function in PHP is an inbuilt function which is used to output a message and terminate the current script. The exit() function only terminates the execution of the script. The shutdown functions and object destructors will always be executed even if exit() function is called. The message to be displayed is passed as a parameter to the exit() function and it terminates the script and displays the message. The exit() function is an alias of the die() function. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&amp;lt;?php //declaring variables &lt;br&gt;
$a=5; $b=5.0; &lt;br&gt;
if ($a==$b) { //terminating script with a message using exit() exit('variables are equal'); } else {&lt;br&gt;
//terminating script with a message using exit() exit('variables are not equal'); } &lt;br&gt;
?&amp;gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt; variables are equal &lt;/p&gt;

&lt;p&gt;The journey is getting more interesting and tasking, getting lot of errors while practicing and learning lot of things. I will appreciate if you can suggest a resource to get PHP mini projects (requiring basic knowledge) to work on, I think that the will go a long way to help in the field, Thanks!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>MODULE 2 of #100DaysOfPHP For Absolute Beginners: PHP Building Blocks</title>
      <dc:creator>Abdulkareem Mustopha</dc:creator>
      <pubDate>Mon, 03 Jun 2019 08:24:34 +0000</pubDate>
      <link>https://dev.to/aphatheology/module-2-100daysofphp-for-absolute-beginners-5gnf</link>
      <guid>https://dev.to/aphatheology/module-2-100daysofphp-for-absolute-beginners-5gnf</guid>
      <description>&lt;p&gt;I wish to update the module 1 article before moving to module 2, but tight schedule won’t let me do that. This is the second article for the #100DaysofPHP for absolute beginners, our mentor made it as a prerequisite to move to the next stage. We are advised to study some topics and then put them together in an article, which is what made me to be here again with a pleading tone; don’t hesitate to correct me if I err in any part of this broad topics, I am just an absolute beginners!!!&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Comparing PHP with other Web Scripting Language&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;3 main languages comes to my mind: Java, JavaScript and Python.&lt;br&gt;
&lt;em&gt;On Java;&lt;/em&gt; it isn't correct to compare Java to PHP. Since PHP is a server-side scripting language whereas Java is a general-purpose language. In other words, PHP is only used as a server-side language where Java is both for server-side and desktop programming language. Moreover, Java is compiled and strongly-typed language. On other hand, PHP is a dynamic typed language.&lt;br&gt;
&lt;em&gt;On JavaScript;&lt;/em&gt; it is not fair to compare PHP and JavaScript, as they both have different purposes for web-site development. PHP is a server side scripting language while JavaScript is a client-side scripting language (though JavaScript now supports server side execution via NodeJS). In fact, the most dynamic website is created when we use functions of both these languages together. If PHP is like a paintbrush to paint picture, then JavaScript isa paint-color.&lt;br&gt;
&lt;em&gt;On Python&lt;/em&gt; (which is 5years older than PHP); Python and PHP are two of the most popular high-level programming languages. PHP is traditionally used as a server-side scripting language, while Python is valued for its dynamics, availability, and simplicity. Despite their almost identical popularity among developers, these two languages have many specifics and differences.&lt;br&gt;
PHP and Python have a number of common properties that make them popular:&lt;br&gt;
Both languages are easy to learn (compared to C++, Perl, and others);&lt;br&gt;
Both languages are accompanied by the extensive and detailed documentation;&lt;br&gt;
Both languages are open source and can be updated and advanced by users with the purpose of improvement;&lt;br&gt;
Wide and friendly developer communities facilitate the process of learning and working with PHP and Python;&lt;br&gt;
Portability and versatility: both languages have IDEs for all the major operating systems.&lt;/p&gt;

&lt;p&gt;The major difference between them is in their syntax and Development Logic; The first and most important difference between PHP and Python is their orientation. Python is aspect-oriented (separates the program functionality and splits the program into separate modules), while PHP is object-oriented (encapsulates code modules that contain certain functions and data into objects).&lt;/p&gt;

&lt;p&gt;The list of secondary PHP and Python differences is as follows:&lt;br&gt;
Python is considered a more flexible programming language, while PHP is tightly regulated;&lt;br&gt;
Python uses special packages to load additional libraries, while PHP requires loading them manually;&lt;br&gt;
Unlike PHP, where assuring the software security requires additional tools, applications written in Python are considered among the safest;&lt;br&gt;
Although Python supports a graphical user interface and can be used in web development,&lt;br&gt;
PHP, originally created to support web applications, is more applicable in this area.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;HOW TO INSTALL PHP&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;To start using PHP, you can:&lt;br&gt;
Find a web host with PHP and MySQL support&lt;br&gt;
Install a web server on your own PC, and then install PHP and MySQL&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using a Web Host With PHP Support&lt;/strong&gt;&lt;br&gt;
If your server has activated support for PHP you do not need to do anything. Just create some .php files, place them in your web directory, and the server will automatically parse them for you. You do not need to compile anything or install any extra tools.&lt;br&gt;
&lt;em&gt;Because PHP is free, most web hosts offer PHP support.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setting Up PHP on Your Own PC&lt;/strong&gt;&lt;br&gt;
However, if your server does not support PHP, you must: install a web server, install PHP, install a database, such as MySQL&lt;/p&gt;

&lt;p&gt;*The official PHP website (PHP.net) has installation instructions for PHP: &lt;a href="http://php.net/manual/en/install.php"&gt;http://php.net/manual/en/install.php&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;PHP DELIMITERS&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;PHP code is identified and separated from embedded HTML with delimiters. The delimiters are the &lt;strong&gt;&amp;lt;?php&lt;/strong&gt; and the &lt;strong&gt;?&amp;gt;&lt;/strong&gt;. All PHP is written between these delimeters. An open delimiter &amp;lt;?php must have a closing delimiter ?&amp;gt;.&lt;br&gt;
Delimiters have a huge role in all the programming languages including PHP. Think of delimiters as a character or set of characters that you use to differentiate between/recognize the different set of similar data.&lt;br&gt;
Also in PHP (in smaller sense) they are used for functions like split or join.&lt;br&gt;
And in the broader sense delimiters are everywhere - whether you have to recognize where your code block starts and ends({,}) and everything else similar which programming languages enforces upon as syntax.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;VARIABLE INITIALIZATION IN PHP&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Variable is nothing it is just name of the memory location.&lt;br&gt;
A Variable is simply a container i.e used to store both numeric and non-numeric information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rules For Variable Declaration&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Variable name in PHP is case sensitive, $mustbeta is different from $mustBeta. A popular advice is to have a pattern for your variable names, this will aid you when using them later.&lt;/li&gt;
&lt;li&gt;Variables in PHP starts with a dollar ($) sign, followed by the name of the variable.&lt;/li&gt;
&lt;li&gt;The variable name must begin with a letter or the underscore character.&lt;/li&gt;
&lt;li&gt;A variable name can only contain alphanumeric characters and underscores (A-z, 0-9, and _ )&lt;/li&gt;
&lt;li&gt;A variable name should not contain space&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Assigning Values to Variables&lt;/strong&gt;&lt;br&gt;
Assigning a value to a variable in PHP is quite easy: use the equality(=) symbol, which also to the PHP’s assignment operators. This assign value on the right side of the equation to the variable on the left.&lt;br&gt;
A variable is created the moment you assign a value to it:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PHP Variables Scope&lt;/strong&gt;&lt;br&gt;
In PHP, variables can be declared anywhere in the script. We declare the variables for a particular scope. There are two types of scope, the local scope where variables are created and accessed inside a function and global scope where variables are created and accessed outside a function.&lt;br&gt;
Example:&lt;br&gt;
&amp;lt;?php&lt;br&gt;
//global scope&lt;br&gt;
$x = 10;&lt;br&gt;
function var_scope ()&lt;br&gt;
{&lt;br&gt;
//local scope&lt;br&gt;
$y =20;&lt;br&gt;
echo "The value of x is : $x " . "&lt;br&gt;" ;&lt;br&gt;
echo "The value of y is : $y ". "&lt;br&gt;" ;&lt;br&gt;
}&lt;br&gt;
var_scope ();&lt;br&gt;
echo "The value of x is : $x ". "&lt;br&gt;" ;&lt;br&gt;
echo "The value of y is : $y " ;&lt;br&gt;
?&amp;gt;&lt;br&gt;
In the above script there are two variables $x and $y and a function var_scope(). $x is a global variable since it is declared outside the function and $y is a local variable as it is created inside the function var_scope(). At the end of the script var_scope() function is called, followed by two echo statements. Lets see the output of the script :&lt;br&gt;
The value of x is :&lt;br&gt;
The value of y is : 20&lt;br&gt;
The value of x is : 10&lt;br&gt;
The value of y is :&lt;/p&gt;

&lt;p&gt;There are two echo statements inside var_scope() function. It prints the value of $y as it is the locally declared and cannot prints the value of $x since it is created outside the function.&lt;br&gt;
The next statement of the script prints the value of $x since it is global variable i.e. not created inside any function.&lt;br&gt;
The last echo statement cannot prints the value of $y since it is local variable and it is created inside the function var_scope() function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Destroying PHP Variables&lt;/strong&gt;&lt;br&gt;
To destroy a variable, pass the variable to PHP’s &lt;strong&gt;unset( )&lt;/strong&gt; function.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;PHP Data Types&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Variables can store data of different types, and different data types can do different things.&lt;br&gt;
PHP supports the following data types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;String&lt;/li&gt;
&lt;li&gt;Integer&lt;/li&gt;
&lt;li&gt;Float (floating point numbers - also called double)&lt;/li&gt;
&lt;li&gt;Null&lt;/li&gt;
&lt;li&gt;Boolean&lt;/li&gt;
&lt;li&gt;Array&lt;/li&gt;
&lt;li&gt;Object&lt;/li&gt;
&lt;li&gt;Resource&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; The PHP &lt;strong&gt;var_dump()&lt;/strong&gt; function (which is used severally in this section) returns the data type and value.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;PHP String&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Hold letters or any alphabets, even numbers are included. These are written within double quotes during declaration. The strings can also be written within single quotes but it will be treated differently while printing variables. To clarify this look at the example below.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&amp;lt;?php&lt;br&gt;
$name = "Aphatheology" ;&lt;br&gt;
echo "My in name is $name" . “&lt;br&gt;
echo 'My name is $name' ;&lt;br&gt;
?&amp;gt;&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
My name is Aphatheology&lt;br&gt;
My name is $name&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;PHP Integer&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;An integer data type is a non-decimal number between -2,147,483,648 and 2,147,483,647 i.e from 2^31 to 2^31.&lt;br&gt;
&lt;strong&gt;Rules for integers:&lt;/strong&gt;&lt;br&gt;
An integer must have at least one digit&lt;br&gt;
An integer must not have a decimal point&lt;br&gt;
An integer can be either positive or negative&lt;br&gt;
Integers can be specified in three formats: decimal (10-based), hexadecimal (16-based – prefixed with 0x) or octal (8-based - prefixed with 0), or binary (2-based - prefixed with 0b).&lt;br&gt;
&lt;strong&gt;If an integer is placed between single or double quotes, it becomes a string!!!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Float (or Double)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Can hold numbers containing fractional or decimal part including positive and negative numbers. By default, the variables add a minimum number of decimal places.&lt;br&gt;
&lt;strong&gt;If a float is placed between single or double quotes, it becomes a string!!!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;NULL&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Null is a special data type which can have only one value: NULL. A variable of data type NULL is a variable that has no value assigned to it.&lt;br&gt;
Tip: If a variable is created without a value, it is automatically assigned a value of NULL.&lt;/p&gt;

&lt;p&gt;It is a good practice to follow the convention by writing it in capital form i.e NULL but it is not case sensitive.&lt;br&gt;
Variables can also be emptied by setting the value to NULL.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Boolean&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Hold only two values, either TRUE or FALSE. Successful events will return true and unsuccessful events return false. NULL type values are also treated as false in Boolean. Apart from NULL, 0 is also consider as false in Boolean. If a string is empty then it is also considered as false in Boolean data type.&lt;br&gt;
&lt;strong&gt;If a Boolean value is placed between single or double quotes, it becomes a string!!!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;ARRAY&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Array is a compound data-type which can store multiple values.&lt;br&gt;
&lt;strong&gt;There are two ways to declare an array.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An array can be declared using the array() function.&lt;/li&gt;
&lt;li&gt;An array can be declared wrapping with [ and ]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Elements of the arrays should be separated with a comma. And, elements can be any type of data we’ve discussed in this module.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PHP Arrays Example&lt;/strong&gt;&lt;br&gt;
&amp;lt;?php&lt;br&gt;
$array = array(false , '573.85' , 'Orange' ,&lt;br&gt;
'Mango' );&lt;br&gt;
var_dump($array);&lt;br&gt;
echo “&lt;br&gt;”;&lt;br&gt;
$array = [ TRUE , 573.85 , NULL , 'Mango' ];&lt;br&gt;
var_dump($array);&lt;br&gt;
?&amp;gt;&lt;br&gt;
&lt;em&gt;More explanation on Array will be available in subsequent module.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;PHP Object Data type&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;An object is a particular instance of a class where it can be a combination of variables, functions, and data structures.&lt;br&gt;
I will learn/discuss about objects in the Object Oriented Programming class for subsequent modules.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;PHP Resource Data type&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Another way to assign values to variables: assign by reference. This means that the new variable simply points the original variable. Changes to the new variable affect the original, and vice a verse.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;PHP Constants&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;A constant is an identifier (name) for a simple value. The value cannot be changed during the script. A valid constant name starts with a letter or underscore (no $ sign before the constant name).&lt;br&gt;
&lt;strong&gt;Creating a PHP Constant&lt;/strong&gt;&lt;br&gt;
The define() function in PHP is used to create a constant as shown below: &lt;br&gt;
&lt;em&gt;define( name, value, case_insensitive )&lt;/em&gt;&lt;br&gt;
The parameters are as follows:&lt;br&gt;
name: The name of the constant.&lt;br&gt;
value: The value to be stored in the constant.&lt;br&gt;
case_insensitive: Defines whether a constant is case insensitive. By default this value is False,&lt;br&gt;
i.e., case sensitive.&lt;/p&gt;

&lt;p&gt;&amp;lt;?php&lt;br&gt;
// This creates a case-sensitive constant&lt;br&gt;
define( "MODULE2" , "About to complete my article for day 6-10 of my #100DaysofPHP" );&lt;br&gt;
echo MODULE2 . "&lt;br&gt;" ;&lt;br&gt;
// This creates a case-insensitive constant&lt;br&gt;
define( "module2" , "About to complete my article for day 6-10 of my #100DaysofPHP" , true);&lt;br&gt;
echo MODULE2;&lt;br&gt;
?&amp;gt;&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
About to complete my article for day 6-10 of my #100DaysofPHP&lt;br&gt;
About to complete my article for day 6-10 of my #100DaysofPHP&lt;br&gt;
*&lt;em&gt;Constants are Global: *&lt;/em&gt; By default, constants are automatically global, and can be used throughout the script, accessible inside and outside of any function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Constants vs Variables&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A constant, once defined can never be undefined but a variable can be easily undefined.&lt;/li&gt;
&lt;li&gt;There is no need to use dollar sign($) before constants during assignment but while declaring variables we use a dollar sign.&lt;/li&gt;
&lt;li&gt;A constant can only be defined using a define() function and not by any simple assignment.&lt;/li&gt;
&lt;li&gt;Constants don’t need to follow any variable scoping rules and can be defined anywhere.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;PHP Operators&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Operators are symbols that tell the PHP processor to perform certain actions. For example, the addition ( +) symbol is an operator that tells PHP to add two variables or values, while the greater than ( &amp;gt; ) symbol is an operator that tells PHP to compare two values.&lt;br&gt;
Below are the various groups of operators and basic explanation of what they do, 2 links is provided after them for further reading.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Arithmetic Operators&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The arithmetic operators are used to perform simple mathematical operations which are addition, subtraction, multiplication, division, exponential (raise to power) and modulus (remainder of a division).&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Logical or Relational Operators&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;These are basically used to operate with conditional statements and expressions. Conditional statements are based on conditions. Also, a condition can either be met or cannot be met so the result of a conditional statement can either be true or false.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Comparison Operators&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;These operators are used to compare two elements and outputs the result in Boolean form. It include operations like 'equal to', not equal to, greater than, less than, identical, not identical and co.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4. Assignment Operators&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;These operators are used to assign values to different variable, with or without mid-operations. It include operations like 'add and assign',  'subtract and assign', 'divide and assign' and so on.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5. Array Operators&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The PHP array operators are used to compare arrays.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;6. Increment/Decrement Operators&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The increment/decrement operators are used to increment/decrement a variable's value.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;7. String Operators&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;There are two operators which are specifically designed for strings. They are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;*&lt;em&gt;Concatenation ( . ) *&lt;/em&gt;&lt;br&gt;
$str1 . $str2&lt;br&gt;
Concatenation of $str1 and $str2&lt;br&gt;
Example:&lt;br&gt;
&amp;lt;?php&lt;br&gt;
$x = "Hello" ;&lt;br&gt;
$y = " World!" ;&lt;br&gt;
echo $x . $y ; // Outputs: Hello World!&lt;br&gt;
?&amp;gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;*&lt;em&gt;Concatenation assignment ( .= ) *&lt;/em&gt;&lt;br&gt;
$str1 .= $str2&lt;br&gt;
Appends the $str2 to the $str1&lt;br&gt;
Example: &lt;br&gt;
&amp;lt;?php&lt;br&gt;
$x = "Hello" ;&lt;br&gt;
$y = " World!" ;&lt;br&gt;
$x . = $y ;&lt;br&gt;
echo $x ; // Outputs: Hello World!&lt;br&gt;
?&amp;gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;For further study on PHP Operators:&lt;/em&gt;&lt;br&gt;
Link 1: &lt;a href="https://www.tutorialrepublic.com/php-tutorial/php-operators.php"&gt;https://www.tutorialrepublic.com/php-tutorial/php-operators.php&lt;/a&gt;&lt;br&gt;
Link 2: &lt;a href="https://www.w3schools.com/php/php_operators.asp"&gt;https://www.w3schools.com/php/php_operators.asp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The hardest part of this module is the PHP Operators, reading will only give an insight while several practices is what will really let one understand it.&lt;br&gt;
This article is written in fulfilment of Module2 (Day 6 - 10) of our #100daysofPHP for absolute beginners.&lt;/p&gt;

&lt;p&gt;PS: I have checked the markdown preference, I still don't know how to format my examples, adding screenshots of them will be too tedious, kindly help a dummy on dev.to&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Introduction to PHP for absolute beginners</title>
      <dc:creator>Abdulkareem Mustopha</dc:creator>
      <pubDate>Fri, 31 May 2019 05:14:41 +0000</pubDate>
      <link>https://dev.to/aphatheology/introduction-to-php-for-absolute-beginners-ec5</link>
      <guid>https://dev.to/aphatheology/introduction-to-php-for-absolute-beginners-ec5</guid>
      <description>&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; This article is meant for beginners in this field, written by a dummy in Php, don't expect extensive explanation!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is PHP?
&lt;/h2&gt;

&lt;p&gt;PHP stands for Hypertext Preprocessor. Most online source did not explain why it is not HPP,later found out through Wikipedia that it's original name is Personal Home Page!&lt;/p&gt;

&lt;p&gt;It's an open source, server-side, scripting language used for the development of web applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  WHY DO WE USE PHP?
&lt;/h2&gt;

&lt;p&gt;There are many reasons to use PHP for server side programming, firstly it is a free language with no licensing fees so the cost of using it is minimal.&lt;/p&gt;

&lt;p&gt;A good benefit of using PHP is that it can interact with many different database languages including MySQL. Both PHP and MySQL are compatible with an Apache server which is also free to license. PHP can also run on Windows, Linux and Unix servers.&lt;/p&gt;

&lt;p&gt;Due to all these languages being free it is cheap and easy to setup and create a website using PHP.&lt;/p&gt;

&lt;p&gt;PHP also has very good online documentation with a good framework of functions in place. This makes the language relatively easy to learn and very well supported online. There are countless forums and tutorials on various PHP methods and problems so it is usually very easy to find help if you need it.&lt;/p&gt;

&lt;p&gt;Due to PHP being so accessible and cheap to setup there are a lot of people who know how to use the language which makes finding new employees proficient in this language less challenging.&lt;/p&gt;

&lt;p&gt;In summary, PHP is widely used because it is Open source, easy to setup, cross platform compatibility, large online resources to learn from and many frameworks available to work/start with.&lt;/p&gt;

&lt;h2&gt;
  
  
  PHP STRENGTH
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It is open source language&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Eliminates client configuration problems. With PHP there is no need to worry if the client has the appropriate software installed, since the application is executed on the server. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;NP: This is my fifth day learning about PHP, I might update this article as I understand more about this precious language&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
