unpacker php from js function