Look at the project code yesterday, see a line of code is probably written like this
Array_filter ($array, Array ($this, ' functionname ');
Never seen this before, functionname is a method name for the controller. Curious how PHP works with this callback method? There is where you can learn this PHP artifice, I see the PHP manual does not have this kind of introduction ah.
Reply to discussion (solution)
Array array_filter (array input [, callback callback])
If callback is an object, the method should write an array (object name, method name)
But I did not read much, and did not see the statement of the authoritative document, do not remember how to know how to express the way
The manual has written:
An object's methods are passed as an array, the array's subscript 0 indicates the object name, and subscript 1 indicates the method name.
For static classes that are not instantiated as objects, to pass their methods, replace the object name indicated by the array 0 subscript with the name of the class.