use php 5.4 closures see #3687