Manual
H1>Directory listGrammarFixed constantsA constant is an identifier (first name) of a simple value. As a name, this value cannot be changed during the execution of the script (except for the Magic constants __file__ and __line__). The
According to the official explanation1. $ GLOBALS ['var'] is an external global variable.2. global $ var is an external reference or pointer with the same name as $ var.Let's take a look at the following example:For example: The code is as follows:
The role of the 1:php global variable is to define global variables, but this global variable is not applied to the entire site, but to the current page, including all files of include or require
$ a = 123 ;
function AA ()
{
Copy CodeThe code is as follows:
/* Data types convert to and from each other
* One is a cast
* SETTYPE (variable, type); Int,integer,float,double and so on.
* This function changes the type of the original variable, using Var_dump (); You can view
1. Defining ConstantsDefine ("CONSTANT", "Hello World");
Constants can only contain scalar data (boolean,integer,float and string).
When calling a constant, simply use the name to get the value of the constant, not the "$" symbol, such as: Echo
Static members of a class are different from general class members: static members are irrelevant to the instance of the object and only related to the class itself. They are used to implement the efficacy and data to be encapsulated by the class,
Ec (2); variables are used to store values, such as numbers, text strings, or arrays. Once a variable is set, we can reuse it in the script. All variables in PHP start with the $ symbol. The correct way to set variables in PHP is: $ var_namevalue;
PHP learning notes 01PHP integrated installation environment AppServ, built-in apache, mysql, php script parsing tools. Development Tool: ZendStudio. : Www.zendstudio.net. Set workspace to the phpwww directory for debugging. Set the Zend template.
1. Module and Dependency Injection Overview 1. Understanding ModulesThe Angularjs module is a container that isolates code and organizes it into simple, neat, reusable blocks.The module itself does not provide direct functionality: an instance of an
[Fengma family _ php] basic php knowledge, _ basic php knowledgeReview
What is the development history of php and php?
Configure php in apache
Configure mysql in php
How apache works
How the web works (similar to 4)
Domain name-based VM
I. PHP installation and Setup can be run in a variety of operating systems. The current operating systems are mainly divided into two types: Windows series and UNIX series. There is a big difference between installing and setting the PHP runtime
/* + --------------------------------------------------------------------------------- + | = This article is Haohappy read
> | = Notes in the middle Classes and Objects chapter | = translation + personal experience | = Do not repost to avoid
Is that right?Define (' Best_phper ', Array (' name ' = ' Gong wen ', ' address ' = ' China ');My God, clearly told you not to be able to , reason is warning:constants may only evaluate to scalar values.That is, the value of the define constant,
Some friends say that these two are actually differences in writing. Let me prove the difference between global and $ GLOBALS. If you need them, please refer to them for details.
According to the official explanation
1. $ GLOBALS ['var'] is an
Global is a global variable in php. This global is only a global variable on the page. For example, we can directly use the global declaration in the function to obtain the value of the variable.
Example
The Code is as follows:
Copy
Chapter 2 Notes on variables and Basic Types
2.1 Basic built-in types
-- C ++ defines a group of integers, floating-point numbers, single characters, and boolean values. It also defines a special type called void. The void type does not have a
PHP BasicsI. First knowledge of PHPPHP is an embedded language mixed with HTML.1. PHP tagDefault tag Short mark , You need to enable the short_open_tag option in php. ini. It is not recommended to enable the short tag and other tags.
2. keywords
PHP Global variables will find many problems in practical applications that need to be constantly improved. In this article, we provide some specific solutions to the problems with PHP Global variables.1: PHP Global variables define Global variables.
Constants we all know is to define the amount of good one constant, in PHP the definition of the rule is define ("Constant name", "Constant value");That is, in all the pages can go to use this constant simple definition of a few constants do not
Static members of a class are different from general class members: static members are irrelevant to the instance of the object and only related to the class itself. they are used to implement the functions and data to be encapsulated by classes,
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.