This article mainly introduces the PHP function to pass the value of the reference delivery considerations, involving the PHP configuration file settings and the use of array function skills, the need for friends can refer to the next
This article describes the reference delivery considerations for PHP function transfer values. Share to everyone for your reference, as follows:
Strict standards:only variables should be passed by reference
Online to find the information there is such a sentence:
In php5.3 above version of this problem, should also be related to the configuration of PHP, as long as the sentence to split into two sentences there is no problem. because the arguments of Array_walk are passed by reference, more than 5.3 by default can only pass specific variables, and cannot return a value through a function. Of course you can also modify the error_reporting in php.ini = E_all | E_strict, but it does not conform to the norm.
$suffix = Array_pop (Explode (".", $file _name));
Why is the higher version of this restriction?
I'll go see the function prototypes in the manual:
Mixed Array_pop (array & $array) bool Array_walk (array & $array, callable $funcname [, mixed $userdata = NULL] )
The & symbol specifies that the variable is passed in and is referenced.
Switch
$file _name_arr = Explode (".", $file _name); $suffix = Array_pop ($file _name_arr);
We can.
In fact, it's just a warning. is not a fatal error. The normal result is to be able to get. For example, it is normal to get the suffix of the file name here.