?
Ce document utilise Manuel du site Web PHP chinois Libérer
void assign_by_ref
(string
varname, mixed var)
This is used to assign values to the templates by reference instead
of making a copy. See the PHP manual on variable referencing for an
explanation.
采用引用的方式賦值到模板中,而不是在模板中創(chuàng)建一個數(shù)值的副本。引用的概念可以查看PHP手冊的變量引用部分。
Technical Note: This is used to assign values to the templates by reference. If you assign a variable by reference then change its value, the assigned value sees the change as well. For objects, assign_by_ref() also avoids an in-memory copy of the assigned object. See the PHP manual on variable referencing for an in-depth explanation.
注意:本函數(shù)用于采用引用的方式賦值到模板中。如果把一個 變量采用引用的方式賦值后,變量的值又被改變了,那么在模板中將會看到變量改變后的值。對于對象,assign_by_ref()函數(shù)也避免了對象的內(nèi)存 拷貝。進一步的解釋可以查看PHP手冊的變量引用部分。
Example 13-4. assign_by_ref
|