We often see bits __set __get __isset __unset The usage of these things in the object-oriented PHP, but I don't understand why we use them, so let's introduce the usage of their brother four.
In general, it is more realistic logic to always define
◆ Function: reformat the data received from the standard input, and then provide it as a parameter to other commands.
◆ Example:
◆ Convert the command output to one line for display
[Root @ web2] # megacli-pdlist-aall | grep-e 'slot number: |
Copy CodeThe code is as follows:
Nationwide, judging whether the $request_uri contains HTML
if (!strpos ($_server["Request_uri"], ". html"))
{
$page = "http://qq.ip138.com/weather/";
$html = file_get_contents ($page, ' R ');
$pattern = "/
National
1 echo and @@ # Disable single-row echoEcho off # Close echo from the next line@ Echo off # disable echo from the beginning of the line. This is the first line of batch processing.Echo on # enable echo from the next lineEcho # shows whether the
1Echo and @Echo command@ # Disable single-row echoEcho off # Close echo from the next line@ Echo off # disable echo from the beginning of the line. This is the first line of batch processing.Echo on # enable echo from the next lineEcho # shows
Reprinted from: http://www.okajax.com/a/201106/php_unset.html
The unset () function of PHP is used to clear and destroy variables. unused variables can be destroyed using unset. However, in some cases, the memory occupied by destroying variables
1 echo@ # Disable single-row echoEcho off # Close echo from the next line@ Echo off # disable echo from the beginning of the line. This is the first line of batch processing.Echo on # enable echo from the next lineEcho # shows whether the current
The file_get_contents () function is the preferred method for reading the file content into a string.In The Help Manual above, all the content is read into the memory at a time, and we will also discuss the following examples._ Get_contents can read
Play the PHP Array (ii)
' www.xinhuastm.com ');//reading an array element echo $arr [2], ''; echo $arr [' url '], '';//what type of value is allowed for the array cell? PHP has 8 types of variables//A: Can accommodate all legal types in PHP, that
Play the PHP Array (ii)
' www.xinhuastm.com ');//reading an array element echo $arr [2], ''; echo $arr [' url '], '';//what type of value is allowed for the array cell? PHP has 8 types of variables//A: Can accommodate all legal types in PHP, that
First look at the unset function syntax
unset
Deletes a variable.
Syntax: int unset (mixed Var);
return value: Integer
Function type: PHP system function
Content Description
This function deletes the variable and returns a true value for
The three main features of facial alignment: encapsulation, inheritance, polymorphism, first of all, a simple understanding of the abstract:
When we define a class in the first place, we actually extract the attributes and behaviors that are common
A Memory Overflow SolutionWhen doing statistical analysis of data, often encounter large arrays, memory overflow may occur, here to share my solution. Use examples to illustrate the problem, as follows:Assuming that the log holds 500,000 records,
Correct answer: thanks to the original code universe {code...}: note that this is a very scary question. Please read it carefully! First, there is a condition that cannot be changed, that is, the code of the loop output content, such as {code ...}
The PHP unset () function is used to clear, destroy variables, and we can destroy them with unset (). But at some point, using unset () does not achieve the memory that is consumed by destroying variables! Let's look at an example first:PHP
Copy CodeThe code is as follows:
for ($i = 1; $i $str = str_repeat (' 01234567 ', $i);
$a = Memory_get_usage ();
Unset ($STR);
$b = Memory_get_usage ();
echo "\ n
". $i. ': '. ($b-$a). ' Bytes. ';
}
As seen from the results:
8 x 32 = 256 It is
The Magic functions in PHP include the ToString, call, clone, autoload several commonly used functions, I hope this tutorial will be helpful to you friends.
Summary of object-oriented development
1. Description and configuration of the object. (Can
PHP memory overflow Allowedmemorysizeof solution ============================ Allowedmemorysizeof? Xxxbytes? I have tracked this problem before, but at that time the tool was not used very well. I didn't see it so carefully. this time I made a
This article describes in detail the properties and class methods in the PHP5 class, and there are friends who need to learn to refer to the message.
PHP5 class method
Procedure: A procedure is a sequence of statements that is defined when the
Bat command OverviewReading this article requires some basic dos concepts,Such as: drive letter, file, directory (folder), subdirectory, root directory, current directoryAdd /? For more information about the parameters, see the help documentation of
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.