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
PHP unset Global variables can only destroy local variables in actual use, and can not achieve the purpose of global variables. Here we will deal with this problem concretely. Hope to help you.
Some functions in the language of PHP are literally
In actual use, PHP unset global variables can only destroy local variables and cannot implement global variables. Next we will solve this problem in detail. Hope to help you.
Some functions in PHP are literally hard to understand for beginners. You
In php object-oriented language, _ set _ get _ isset _ unset usage is introduced. We often see the usage of bit _ set _ get _ isset _ unset in php object orientation, but we do not understand why we should use these items, next we will introduce one
Will PHP unset release the memory ?. First, let's look at an example of var_dump (memory_get_usage (); $ alaruence; var_dump (memory_get_usage (); unset ($ a); var_dump (memory_get_usage ()); output (on my PC, let's look at an example
Some people say that PHP's unset does not really release memory, some say, PHP unset only in the release of large variables (a large number of strings, large arrays) when the real free memory, but also said that in the PHP level to discuss memory is
First, let's look at an example.Var_dump (memory_get_usage ());$ A = "laruence ";Var_dump (memory_get_usage ());Unset ($ );Var_dump (memory_get_usage ());Output (on my PC, the load extension may vary depending on the system, PHP version, and load
First let's look at an example
Copy Code code as follows:
Var_dump (Memory_get_usage ());
$a = "laruence";
Var_dump (Memory_get_usage ());
unset ($a);
Var_dump (Memory_get_usage ());
The output (on my PC, may vary
Void
Unset (Mixed
$ VaR [, Mixed
$ VaR [,
$... ])
Unset ()Destroys the specified variable. Note that in PHP 3,Unset ()ReturnsTrue(Actually an integer value of 1), while in PHP 4,Unset ()It is no longer a real function: it is now a statement. In
This article mainly introduces the usage of isset () and unset () functions in PHP in detail. if you need them, you can refer to them and hope to help you.
Isset(PHP 3, PHP 4, PHP 5)
Isset -- check whether the variable is set
DescriptionBool isset (
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.