Use php 5.4 closures $this where safe to
Merge pull request #3687 from GrahamCampbell/4.2-closures

Use PHP 5.4 Closures $this Where Safe To