<? PHP // domain restrictions closure function, and how to pass variables to the closure function # hidden above code, we finally come to try function Demo ( $ ATxt ) { $ FUNC = function () use ( $ ATxt ) { echo $ ATxt ; }; $ FUNC (); } # calling a test demo ( '~ I love PHP' ); ?>