php 5.1 fix for anon function