PHP supports 8 of original data types.
Four scalar types:
? Boolean (Boolean)
? Integer (integral type)
? Float (floating point type, also called double)
? String (strings)
Two types of composite:
? Array (arrays)
? Object (Objects)
Finally,
Each php5.5 variable is stored in a variable container called Zval. A Zval variable container that contains two bytes of extra information in addition to the type and value of the variable: 1, the first is "Is_ref", and is a bool that
It is quicker to use single quotes instead of double quotes to contain strings. Because PHP searches for variables in a string enclosed in double quotes, single quotes are not, note: only echo can do this, it is a "function" that can take multiple
The syntax of PHP is very much like the C language.
1, PHP can be mixed with the HTML code, using the format:
Statement
?>
2, PHP code can also embed HTML code
3, can use JavaScript script to embed PHP code (not recommended)
Like what:
4,
File:MySQL stored procedures. rarSize:467KBDownload:DownloadMySQL 5.0 later version to support stored procedures, stored procedures with consistency, efficiency, security and architecture, and so on, this section explains how PHP manipulates MySQL
This article provides a detailed analysis of the scope of php variables. For more information, see the scope of each variable in PHP, it refers to a field in which variables can be accessed (and thus its value can be accessed. For beginners, the
In the database system, in order to ensure data integrity and consistency, and to improve its application performance, most databases often use stored procedures and storage functions (such as functions in C language ). MySQL5.0 and later support
The reference in PHP means: Different names access the same variable content . A reference to a variablePHP references allow you to use two variables to point to the same contentExample one: hereExample two:From the two examples above, it can be
1, if the method of the class can be defined as static, as far as possible to define as static, it will increase the speed of nearly 4 times times. 2. The speed of $row [' ID '] is 7 times times that of $row[id]. 3. Echo is faster than print, and
The concept of arraysArray is a very important concept in PHP, we can think of arrays as a set of similar data, in fact the array is an ordered graph.PHP also provides more than 70 built-in functions to manipulate arrays.Since arrays are important
Callback and anonymous functions in PHP, and anonymous php callback FunctionsPreface
Some time ago, I became a dog in my company. I felt my head deep when I went home from work every day. There are also various things on Saturday and Sunday. If you
1. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only echo can do this, it is a string can be used as a
We all know that we may have multiple methods to complete a given task, however, some of these methods may be easier to operate, but less efficient to complete tasks, some of them are complicated and difficult to think of. They may be more efficient
PHP Optimization for PHP is mainly for php. the main parameters in ini are adjusted and set properly. Let's take a look at php below. how to set parameters that have a greater impact on performance in ini.# Vi/etc/php. ini
(1) Disable finding PHP
1. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only echo can do this, it is a string can be used as a
Use single quotes instead of double quotes to include strings, which is faster. Because PHP will search for variables in strings enclosed by double quotes, but not in single quotes. Note: Only echo can do this. it is a function that can treat
Analysis of the principle of PHP variable separation reference (VariablesSeparation ). First, let's review the structure of zval: Copy the code as follows: struct_zval_struct {* Variableinformation * zvalue_valuevalue; * value * zend_uintrefcount;
Introduction to PHP performance optimization. PHP optimization for PHP is mainly for php. the main parameters in ini are adjusted and set properly. let's take a look at php below. how to optimize some parameters in ini that have a major impact on
[1] The get and post variables cannot be passed between pages. in the latest php version, automatic global variables are disabled, to obtain the submitted variables from the previous page, use $ _ GET [foo], $ _ POST [foo], $ _ SESSION [foo] can
Php efficient writing of 40 examples. 0. replace double quotation marks with single quotes to include strings. this will be faster. Because PHP will search for variables in strings enclosed by double quotation marks, but not in single quotation
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.