In PHP, single and double quotes are not interoperable, the specific difference is as follows:
The fields inside the double quotes are interpreted by the compiler and then exported as HTML code.
' Single quotes inside without explanation, direct
Reference: First, the user log into the system after the system environment variables:
$HOME user's own directory
$PATH directory to search for when executing commands
$TZ Time Zone
$MAILCHECK every few seconds to check for new letters
$PS 1 The
Q: Under what circumstances does "pattern" match an empty string?A: Be careful to use * and as - they can match 0 times.-- 如果你打算用"%a*"匹配单词,你会发现到处都是单词。print(string.find(";$% **#$hello13""%a*")) --> 1 0print(string.find(";$% **#$hello13""%a*"6)
In common with other programming languages, PHP uses the term string to refer to text. when you store a string in a variable, You Need To enclose it in quotes. both single and double quotes are acceptable, but they work in subtly different ways.
A flexible string.
Because of the flexibility of the expression, we can use the "mapping" method to bring up a string or function.
$a = ' B ';
$b = ' 123 ';
echo $ $a; This can output 123. But the better habit is the echo ${$a}, which is clearer.
$c
The difference between single and double quotation marks in PHP, double quotes in PHP quotes
1. Defining stringsIn PHP, the definition of a string can use either single quotation marks or double quotes. However, you must use the same single or
The PHP parser uses a pair of quotes to judge a string. Therefore, all strings must use the same single or double quotation marks to define the start and end. For example, the following string definition is illegal: 1 The difference between single
CSV is an ancient data transmission format, and its full name is comma-separated values (comma-separated value). Born in that standard-missing wilderness, the standard of CSV has been (by 2005) null--in the world there are n CSV formats, they are
The simple answer is clearly feeble. Let's do an experiment today to see what the difference between single and double quotes is, who is fast and who is slow.
The test code is as follows:
Copy Code code as follows:
$single _quotes = '
Environment: VirtualBox4.1 + RedHat Linux 6 + Putty0.62
Single quotation mark:
What you can say is what you see: The output of the contents of the single quotation mark, or the output of what is seen in single quotes. Single quotes ' are full
The main difference is that delimited identifiers are enclosed in double quotes (Transact-SQL also supports the use of square brackets: [identifiers]) and is case-sensitive. Single quotes are used only for the delimitation of strings. In general,
Special characters in the Shell have
1, $ dollar character2, reverse Slash3, ' inverted quotation mark4, "double quotes5, ;,*,?, [,]
Let me make a list of the following
One, $ symbol
1, echo $? The previous instruction exit status is displayed2,
1 The difference between single and double quotes in PHP
In PHP, a string is usually defined in a pair of quotes, such as:
' I am a string in single quotes '
"I am a string in double quotes"
The PHP parser uses a pair of quotes to judge a string.
Shell Common knowledge
First, the user login into the system after the system environment variables
$HOME user's own directory$PATH directory to search for when executing commands$TZ Time Zone$MAILCHECK every few seconds to check for new
Basic Usage
In conclusion:
Single quotes in any case represent only the characters within the quotation marks. In other words, the contents of single quotes do not make the substitution of variables and the escape of characters. In double quotes,
Programming
In many web programming, strings are always generated and processed in large quantities. The proper use and processing of strings is also increasingly important for PHP programmers. This article from the simplest string definition has
There is no difference between single quotes and double quotes.Copy codeThe Code is as follows: ----------------- incorrect ----------------- correct Double quotation marks must be used as follows:Var str = "abc \" def \ "ghi"Double quotation marks
When using Oracle, I found that the use of single and double quotation marks is different. I checked some information online and summarized it myself: Double quotation marks: when an object is created, the object name,
When using Oracle, I found
Welcome to the Linux community forum and interact with 2 million technical staff to enter 1.php? $ Str frozen fish; echo $ str's blog address is www.xker.com; note that this is a single quotation mark. 2.php? $ Str frozen fish; echo $ str's blog
In Oracle:
Double quotation marks are used to indicate that when an object is created, the object name and field name are added with double quotation marks, indicating that Oracle will be case-sensitive. Otherwise, each else will be capitalized
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.