I ran the following code using your example as a template:
<?php
require("DocxMerge.php");
$dm = new DocxMerge();
$dm->merge( [
"doc2.docx",
"doc1.docx"
], "result.docx" );
?>
result.docx only winds up containing the material from the first docx file (in this case doc2.docx). PHP version 5.5.24 (cli)