make testChunks work with PHP