PHP compatibility fixes

Array instantiation caused problems with older PHP versions