There are 8 types in PHP
4 kinds of scalar: int integer
BOOL Boolean
Float,double,real
String
2 Types of composite: array
Object
2 Special types: Resource type Resource
Empty type null
The declaration of a string
1. Single and double quotes can declare strings
2. The declared string has no length limit
3. In a double quote string, you can either parse the variable directly or use the escape character directly (you can escape the single quotation mark itself, or you can escape the escape character "\")
4. In a single quote string, you cannot parse a variable directly, or you can use an escape character
5. Double quotes can no longer be used in double quotes, single quotes cannot be used again
6. It is best to use single quotes,
$str = ' AAAAA ';
$str = "AAAA";
Delimiter declaration string, large number of strings
Test is a custom string that cannot be followed by any characters, nor can spaces
You also want to end with test this custom string, no characters before ending
$str =<<<test
This write content ...
Test
>
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.