<?php
require_once 'vendor/autoload.php';
use PhpOffice\PhpWord\TemplateProcessor;
$templateProcessor = new TemplateProcessor('test.docx');

$templateProcessor->setValue(
		'nama','Fali'
);

$pathToSave = 'result.docx';
$templateProcessor->saveAs($pathToSave);

?>