Can you unset() many variables at once in PHP?

前端 未结 4 1297
醉酒成梦
醉酒成梦 2020-12-11 15:04

I have a pretty high traffic social network site,
I would like to get into the habit of unsetting large array and mysql object and even some string variables.

S

4条回答
  •  时光说笑
    2020-12-11 15:45

    Also you can extend any PHP function, look at example

    function multiply_foo()
    {
        foreach(func_get_args() AS $arg)
            foo($arg);
    }
    
    multiply_foo($arg1, $arg2, $arg3);
    

    via PHP: func_get_args

提交回复
热议问题