About PHP closures
Generally PHP closures are constructions of an anonymous function (a function without a name) stored in variable. For example:
$records=someFunctionToGetAllRecords(); $getRecord = function($recNum)use($records){ return $records[$recNum]; } var_dump($getRecord(10)) //Will return a specified record from records array