This article mainly introduces the method of dynamically creating functions when PHP is running, involving the usage skills of PHP process statements and create_function functions. Need Friends can refer to it
The example in this article describes the method of dynamically creating functions when PHP is running. Share it with everyone for your reference. The specific analysis is as follows:
General language functions must be defined at runtime, and PHP supports dynamic creation of functions at runtime. The following is a simple example to create a function $a according to different conditions during exercise
?
3 4 5
|
if (count($_POST) > 0) { |