PHP extension text processing -- PCRE regular expression syntax 6 -- Character class (square brackets) and optional path (|)
Character class (square brackets)
The left square brackets start the description of a character class and end with square
Why are multiple function parameters followed by half square brackets in the php manual? What are the meanings of these parentheses? I have always had this question. google and Baidu have no answer. I don't know if anyone can give me a answer.
When I look up some documents, I often see functionfuncname ([arg1 [, arg2 [..., argn]) {statements} or the rhinoceros varname_1 [value_1] [,..., name_n [value_n]. Similarly, it is often found in the php or css manual... I often see this method when
Why are there half a square brackets behind the many function parameters in the PHP manual? What's the point of these parentheses?
Always have this question, Google, Baidu has no answer, do not know if anyone can give a solution.
Thank
Reply
Php uses regular expressions to extract characters in the brackets, parentheses, brackets, and braces of a string. PHP uses regular expressions to extract character examples in string brackets, parentheses (), brackets [], and braces {}. For more
PHP uses regular expressions to extract character examples in string brackets, Parentheses (), brackets [], and braces {}. For more information, see
PHP uses regular expressions to extract character examples in string brackets, Parentheses (),
PHP uses regular expressions to extract the characters in the string with angle brackets <>, parentheses (), brackets [], curly braces {} Descriptor examples, the friends you need can refer to the following
The code is as follows:
$str = "Hello
PHP uses regular expressions to extract character examples in angle brackets & lt; & gt;, Parentheses (), brackets [], and braces {}. For more information, see
The Code is as follows:
$ Str = "Hello
(Love) [BEIJING] {Tiananmen Square }";
Document directory
I. Introduction to types
Ii. Boolean
Iii. Integer type
Iv. String
5. Array
PHP supports eight primitive types, including:
Four scalar types: Boolean, integer, float, and string );
Two composite types: array and object
Generally you do not need to change the PHP settings, it usually works well according to the default configuration. But developers as PHP designers consider that users may occasionally need to tweak some of the functionality of the PHP language for
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.