Hello,
We have checked your scripts. The problem is that each time you replace a variable, phpdocx repairs the template variables to avoid unwanted tags in the placeholders (sometimes Word adds spelling tags when writting the words).
To avoid this automatically repairing function, you just need to set the preprocessed parameter as true when you instanciate CreateDocxFromTemplate:
$docx = new CreateDocxFromTemplate('templates/Classic 3TAGS VERTICAL LOGO.docx', array('preprocessed' => true));
After doing this minor change, you'll get these output:
The file using Corporate Version 5 created 17 docx files in 2.249489068985 seconds
The file using Corporate Version 3.3 created 17 docx files in 2.807806968689 seconds
As you can see phpdocx 5 is faster than phpdocx 3.
Regards.