Home > Article > Backend Development > Reference for learning about PHP's __call
Code description: The first parameter $m of __call above is the method name test you want to call. The second parameter is the parameter you passed when calling the method and is passed in as data. Output result: ————- php ——- Method test called: array(4) { [0]=> int(1) [1]=> string(1) “2″ [2]=> float(3.4) [3]=> bool(true) } array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }Output completed (took 0 seconds) – normal termination What is the purpose of this function? Can it automatically obtain parameters? Automatically load n multiple tables of the database? Let’s slowly ponder and experience it while using it. |