I want to read doc file content: PHPWord is installed via Composer. and added dependency into phpword. for reading the content am using this code its loading blank view.
require_once 'autoload.php';
$fileName = "test.docx";
$phpWord = \PhpOffice\PhpWord\IOFactory::load($fileName);
$PHPWord = new \PhpOffice\PhpWord\PhpWord();
$document = $PHPWord->loadTemplate($fileName);
$xmlWriter = \PhpOffice\PhpWord\IOFactory::createWriter($PHPWord, 'Word2007');
$xmlWriter->save("php://output");
$sections = $phpWord->getSections();
$section = $sections[0];
$arrays = $section->getElements();