Process-oriented 2-----PHP

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.