PHP is run on the server side, JS is running on the client's
PHP is a scripting language
<body>
<?php
echo "This is simple PHP, it's too simple, don't forget to add semicolons";
?>
</body>
PHP can do anything other CGI programs can do, such as collecting form data, generating dynamic Web pages, sending and receiving cookies.
PHP scripts are primarily used in three areas: server-side scripting, command-line scripting, desktop applications
hello.php
<body>
<?php
echo "<p>dddddddd</p>";
?>
</body>
You do not have to specify a variable's data type when defining a variable in PHP, there are 8 types of data in PHP: 4 scalar types, 2 composite types, 2 special types
Boolean,integer,float,string Array,object Resourse,null
<?php
$a _boolean=true;
$a _int=12;
$a _float=3.14;
$a _string= "DDDADAFDFD";
Echo GetType ($a _boolean);
Echo GetType ($a _int);
if (Is_int ($a _string))
{
echo "This is a string";
}
?>
Else
{
echo "This is not a string";
}
<?php
$a = 110;
$b =& $a;
?>
PHP provides a number of predefined variables
Include ' B.inc ';
Arithmetic operator, logical operator, assignment operator, bitwise operator, comparison operator, error control operator, execute operator, increment decrement, string, array, type operator
Instanceof:var_dump ($a instanceof MyClass);
If Else
Alternative syntax for Process Control
Process-oriented 2-----PHP