PHP Reference types
Attention
PHP Boolean type
PHP String Type
String declaration
Use and Declaration
Use delimiter arbitrary string
The difference between single and double quotation
What does php Reference & amp? For example: function & amp; test () {static $ B = 0; // declare a static variable $ B = $ B + 1; echo $ B; return $ B ;}? $ A = & amp; test ();? // & Amp; indicates the reference function. test () returns the php
Please be critical of your study and welcome to correct your mistakes.1, about the PHP string argument, the wrong is:A, if the encoding of a script is iso-8859-1, then the string in it will also be encoded as iso-8859-1.B, the PHP string is an array
The following describes the usage of reference characters in PHP. If you need a friend, you can refer to the role of php reference (that is, adding & symbol before variables, functions, objects, etc.). let's take a look at the following program.
For the role of php reference (that is, adding & symbol before variables, functions, and objects), Let's first look at the following program.
"; echo "$ B "; $ a ++; // variable a auto-increment 1 echo "$ a "; echo "$ B "; // check the variable B
1. By creating an instance, you only need to write the code that calls it. Other code of the website is written by yourself. Add the following code to the Editor :? Phpinclude_once (FCKeditorfckeditor. php); reference the FCKeditor. php file $
The following describes the usage of the quote & amp; in PHP. If you need a friend, you can refer to the role of php reference (that is, adding & symbol before variables, functions, objects, etc.). let's take a look at the following program.
The
PHP references (that is, the variables or functions, objects, etc. are preceded by the & symbol), in PHP refers to the meaning: different names to access the same variable content. There is a difference between the pointers in the C language. The
For the role of PHP reference (that is, adding & symbol before variables, functions, and objects), Let's first look at the following program.
1
2
$a = 100; // Declare variable
3
$b = &$a; // Declare
This article mainly introduces 10 pictures to tell you what is a PHP reference, need friends can refer to the following
Seeing a diagram of PHP references in an article is helpful for deepening your understanding of PHP references, back up here.
PHP reference (is in the variable or function, object, etc. before adding & symbol) is a high-level topic, the novice pay attention to, the correct understanding of PHP reference is very important, the performance has a greater impact, and
Joe Brockmeier briefly introduces the PHP scripting language, discusses the origin, performance, and application Platform of PHP. A simple example of a PHP script illustrates its basic syntax and usage.
If you are working on web-based development,
Reference in PHP can be understood as the alias of a variable. Because the PHP variable name is stored in the symboltable, the variable content is stored in the heap, and the reference is to use different symbols in the symbol table) name to access
ClassPerson {public $ name; protected $ age; publicfunction _ construct ($ name, $ age) {$ this-& gt; name $ name; $ this-& gt; age $ age ;}$ lhnewPerson (LIU Hui, 23); $ a $ lh; $ B class Person {
Public $ name;
Protected $ age;
Public function _
Brief Introduction: This is a detailed page of the PHP enterprise-level application's WebService, which introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: //
In PHP a simple & symbol can have a great article to talk about, we briefly talk about the PHP variable reference and parameter value of use, I hope the beginner to see the reference to this article Oh.
In this way $a=test (); The result is not a
Introduction: This is Php, Asp.net web development B/SProgramming LanguageFunction | parameter | detailed page of the user manual, which describes PHP, PHP, Asp.net, web development, and functions | parameters, user manual PHP, asp.net web
The reference in PHP means that different names access the same variable content. the pointer is different from the pointer in C language. the pointer in the C language stores the address variable reference of the variable content stored in the
This article mainly introduces the scope of PHP variables and address reference. if you need it, you can refer to the concept of scope:
Variables can be declared anywhere in the PHP script. However, the location of the declared variables will
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.