Php improvements: support for nested arrays, whitespace, some tests