More tests for fixing PHP 5.4+ bugs