5.3.* compatible - no longer trying to use $this within a closure