II. PHP Data types (php learning)

Source: Internet
Author: User
II. PHP Data types (php learning) 1. basic PHP syntax and data types:

(1) basic PHP syntax:

1. hybrid compilation of htm and php

2. a statement ends with a semicolon)

(2) PHP Data operation type

Four scalar types:

Boolean is interpreted as true or false.

Integer)

Float (float type, also as "double") is interpreted as decimal type

String (string)

Two composite types:

Array)

Object)

Boolean is interpreted as true or false.

$ Bo = TRUE; $ bo = FALSE;

Integer)

$ Bo = 1; $ bo =-12;

Float (float type, also as "double") is interpreted as decimal type

$ BR = 1.001; $ BR = 3.1415926;

String (string)

$ Bo = "this string or EN Word ";

Array)

$ Bo = array (1, 2, 4); $ bo = array ("A" => 1, "B" => 2 );

The first letter of the custom variable can only be: _, a-z, starting with the A-Z.
Single quotes and double quotes can be used for strings. The difference is that single quotes cannot be used (not supported) escape characters.

In Linux, set the directory to 777: The highest permission to read and write data.
Set directory 755: you can only set it on the ftp tool when reading and uploading data, and select File --> attribute --> numeric value.

Set the upload mode to binary when uploading the Discuz Forum.

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.