use php 5.4 closures see #3687
Merge pull request #3718 from cangelis/this_closure

use php 5.4 closures see #3687