Detailed description of the value transfer and address transfer (reference) of the php function. In php, it is relatively simple to pass the function value, but some friends may not understand the transfer or reference of the innocent function, the
The for loop only has limited number indexes. after the for and foreach traversal ends, you do not need to perform the reset () operation on the data for the next traversal, and the each method is required.
The code is as follows:
//$ Arr =
# # 1.
Let's start with a php5.3+ grammar sugar, which we usually write about:
$a = 0;
$b = $a? $a: 1;
Syntax sugar can be written like this:
$a = 0;
$b = $a?: 1;
Execution results $b = 1, the latter is more concise, but usually not too much
Arithmetic operators
Operator name Result
$a + $b addition $a and $b and
$a-the difference between $b subtraction $a and $b
$a * $b multiplication $a and the product of $b
$a/$b division $a divided by the quotient of the $b
$a% $b modulo $a divided
Seemingly simple things, in practical use, is still very interesting
Arithmetic operators
Operator name Result
$a + $b addition $a and $b and
$a-the difference between $b subtraction $a and $b
$a * $b multiplication $a and the product of $b
$a/$b
foreach is a common use in PHP that is used as an array loop.Control statements
.
Because of its convenience and ease of use, nature is also hidden in the back-end of a very complex concrete implementation method (transparent to the user)Today, we'
PHP function Array_udiff The problem encountered in the use of the solution code = Intval ($code);} Public Function GetCode () {return $this->code;} /** * The function must return 0, 1,-1 of these three values in accordance with the actual situation
How to learn about operator priority in php
Operator name result
$ A + $ B addition $ a and $ B's and
$ A-$ B subtraction $ a and $ B
$ A * $ B multiplication $ the product of a and $ B
$ A/$ B Division $ a divided by the operator of $ B
$ A % $ B
Messaging This application is widely used in various websites, and this function is also necessary for a website. This paper mainly introduces the application of Redis in PHP--message passing.
Read Catalogue
1. Abstract
2. Realization method
3, a
Special symbols 1 and #1 in linuxshell programming. comment a line in the script file. 2. the quotation marks and \ symbols are not followed by comments, except that # itself: echo & quot; 12 # hehe & quot; echo & amp; #39; 12 # hehe & amp; #39;
Does PHP have the function of executing the task several seconds later? For example, if there is a code segment, first execute the first line, and then execute the second line after 5 seconds. Note that, instead of a loop, the code is executed in
Article title: BourneShell and shell programming (1 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open
Easy to set basic linux Security Settings
# Vi autosafe. sh #! /Bin/bash######################################## ################################### File: autosafe. sh# Description:# Language: GNU Bourne-Again SHell# Version: 1.1# Date: 2010-6-23#
This article mainly introduces how to use Linux commands to execute and run PHP scripts. The syntax in the PHP language is very similar to that in the language of Perl, which has some PHP features of CJava and runtime, the current stable and latest
PHP Development Web pages need to be stored in the Wamp root directory in the WWW folder to run successfully. At the same time Wamp to be in the running state. Open without a site mode:Enter: localhost/file name in the URL field 1 code
1. It is best to use XML-style PHP markup; 2.echo statement: Prints the string passed to itself to the browser; 3. Note: ①c-style multi-line comments/* * * ②c++ Style single-line comment// ③shell Script Style single-line comment # The comment
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.