Php Create Json Array Python Memory