PHP Tutorial Variable Destruction unset usage
Unset--releasing the given variableDescribevoid unset (mixed var [, mixed Var [, ...]])
Unset () destroys the specified variable. Note in PHP 3, unset () returns True (actually an integer value of 1),
PHP5 object-oriented explanation-(10) _ set () _ get () _ isset () _ unset () four methods. This article briefly introduces four methods for PHP5 object-oriented explanation-(10) _ set () _ get () _ isset () _ unset, if you have any questions,
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
This article briefly introduces four methods for PHP5 object-oriented explanation-(10) _ set () _ get () _ isset () _ unset, if you have any questions, please refer to them.
Application of four methods: _ set () _ get () _ isset () _ unset ()In
The unset function is a function of PHP's own destruction variables, we introduced the use of unset to destroy the static variables and global variables, and can destroy the array variable Oh, let's look at the example below.
Example 1. Unset ()
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
We are learning
The PHP unset () function is used to destroy variables, but most of the time, the function only destroys the variable, and the value of the variable stored in the memory is still not destroyed, that is, it does not achieve the
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 cannot be reached with unset!
The code is as follows:
For ($ I =
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 cannot be reached with unset!
Copy codeThe code is as
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.