函数运行后函数中的变量会被销毁吗?
class B {
function C() {
$x = "123456";
echo "XXX".$x;
// After this function is finished, will $x be destroyed by default to save memory in PHP?
}
}
class A {
function F1() {
return new Class_B();
}
function F2() {
$this->F1()->C();
// After this function is finished, will F1 be destroyed by default to save memory and CPU in PHP?
}
}