title: Can't create a new SplDoublyLinkedList in PHPWord tool, syntax error on 'new'
body: <p><img src="https://i.stack.imgur.com/B78jK.png" alt="enter image description here"></p>
  
  <p>I am trying to edit the PHPWord plugin to better fit my needs. By making the list of sections that the PHPWord main class holds, I can make it so I can insert sections into any order in the document instead of just a fixed list that I can't re-order.</p>
  
  <p>But I am getting an error saying <code>syntax error, unexpected 'new'</code> and it is driving me crazy.</p>
  
  <p>Does anybody else know more about this PHPWord tool? I'm not getting answers from their Github issue tracker/forum.</p>
  
  <p>Something along the lines of they have their defined classes that the tools uses and I need to add it somehow as a resource? I can't just add it in for some reason.</p>
  
  <p>Mucho gracias!</p>
  
  <p>EDIT: </p>
  
  <p>I tried making a new object on this line OTHER than array() or SplDoublyLinkedList() and no matter what other object I try to assign that is outside of the plugin scope I get the 'new' syntax error.</p>
  
  <p>I also tried <code>new ArrayObject();</code> and I'm still getting the error.</p>
  
  <p>PHPWord uses an <code>Autoloader</code>? This is their autoloader code, do I need to somehow include any extra classes I want to use in here somehow?</p>
  
  <pre><code>namespace PhpOffice\PhpWord;
  
  /**
   * Autoloader
   */
  class Autoloader
  {
      /** @const string */
      const NAMESPACE_PREFIX = 'PhpOffice\\PhpWord\\';
  
      /**
       * Register
       *
       * @param bool $throw
       * @param bool $prepend
       * @return void
       */
      public static function register($throw = true, $prepend = false)
      {
          spl_autoload_register(array(new self, 'autoload'), $throw, $prepend);
      }
  
      /**
       * Autoload
       *
       * @param string $class
       * @return void
       */
      public static function autoload($class)
      {
          $prefixLength = strlen(self::NAMESPACE_PREFIX);
          if (0 === strncmp(self::NAMESPACE_PREFIX, $class, $prefixLength)) {
              $file = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, $prefixLength));
              $file = realpath(__DIR__ . (empty($file) ? '' : DIRECTORY_SEPARATOR) . $file . '.php');
              if (file_exists($file)) {
                  /** @noinspection PhpIncludeInspection Dynamic includes */
                  require_once $file;
              }
         }
      }
  }
  </code></pre>