Professional Documents
Culture Documents
PHP Tutorials: Tools Configuration
PHP Tutorials: Tools Configuration
TOOLS CONFIGURATION
Install Xampp
Install Visual Studio Code
Install PHP Storm
Install PHPO Inteliphense extension in Visual Studio Code
To begin with,
and
# The MySQL server
[mysqld]
port= 3307
<?php
echo "Hello Philippines!";
echo '<br>';
echo "Hello World!";
?>
The ‘<br>’ tag is an html tag that separate the statements into
new lines. Using those codes, we will have the following output:
Hello Philippines!
Hello World!
Buttons
<?php
echo "Hello Philippines!";
echo '<br>';
echo "Hello World! ";
echo '<button> Click Me </button>';
?>
Variables
PHP Variables:
String
Integer
Float / double
Boolean
Null
Array
Object
Resource
<?php
$name = 'Jerome Macarilao';
$isMale = true;
$Age = 37;
$Occupation = 'Customer Service Representative';
$Salary = null;
// outputs
echo $name;
echo '<br>';
echo $isMale;
echo '<br>';
echo $Occupation;
?>
Jerome Macarilao
1
Customer Service Representative
Gettype Command
This command displays what kind of type is being used in a
variable. For example:
<?php
$name = 'Jerome Macarilao';
$isMale = true;
$Age = 37;
$Occupation = 'Customer Service Representative';
$Salary = null;
// outputs
echo $name;
echo '<br>';
echo $isMale;
echo '<br>';
echo $Occupation;
echo '<br>';
?>
Result:
Jerome Macarilao
1
Customer Service Representative
string
integer
boolean
Var_dump Command
Var_dump command is used to display the list of several variable
and their type in a single line. For example:
<?php
$name = 'Jerome Macarilao';
$isMale = true;
$Age = 37;
$Occupation = 'Customer Service Representative';
$Salary = null;
// outputs
var_dump ($name, $Occupation, $Age);
?>
Result:
string(16) "Jerome Macarilao" string(31) "Customer Service
Representative" int(37)
is_ Command
The is_ command is used to confirm or validate what type is being
used in a variable. For example:
33:09
https://www.youtube.com/watch?v=yXzWfZ4N4xU