041-PHP closure function as the transmission parameters

? < PHP
 // the closure function passed as a parameter 
    function Demo ( $ obj ) {
         $ obj ( 'I love PHP' ); 
    } 

# pass a closure in the past 
Demo (    function ( $ TXT ) {   echo  $ TXT ;} 
    ) ;
 ?>

 

Guess you like

Origin www.cnblogs.com/tianpan2019/p/10993577.html