title: PHP Compile Error: "Cannot use empty array elements in arrays"
body: <p>I have a Laravel 5 project that is using the <a href="https://packagist.org/packages/bepsvpt/secure-headers" rel="noreferrer">bepsvpt/secure-headers</a> package with the following config file:</p>
  
  <h3><code>config/secure-headers.php</code></h3>
  
  <pre><code>&lt;?php
  
  return [
      'x-content-type-options' =&gt; 'nosniff',
      'x-download-options' =&gt; 'noopen',
      'x-frame-options' =&gt; 'sameorigin',
      'x-permitted-cross-domain-policies' =&gt; 'none',
      'x-xss-protection' =&gt; '1; mode=block',
  
      /*
       * Referrer-Policy
       *
       * Reference: https://w3c.github.io/webappsec-referrer-policy
       *
       * Available Value: 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin',
       *                  'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'
       */
  
      'referrer-policy' =&gt; 'strict-origin-when-cross-origin',
  
      'hsts' =&gt; [
          'enable' =&gt; env('SECURITY_HEADER_HSTS_ENABLE', false),
          'max-age' =&gt; 15552000,
          'include-sub-domains' =&gt; false,
      ],
  
      /*
       * Content Security Policy
       *
       * Reference: https://developer.mozilla.org/en-US/docs/Web/Security/CSP
       *
       * csp will be ignored if custom-csp is not null.
       *
       * Note: custom-csp does not support report-only.
       */
  
      'custom-csp' =&gt; env('SECURITY_HEADER_CUSTOM_CSP', null),
  
      'csp' =&gt; [
          'report-only' =&gt; false,
  
          'report-uri' =&gt; env('CONTENT_SECURITY_POLICY_REPORT_URI', false),,
  
          'upgrade-insecure-requests' =&gt; false,
  
          'base-uri' =&gt; [
              //
          ],
  
          'default-src' =&gt; [
              //
          ],
  
          'child-src' =&gt; [
              //
          ],
  
          'script-src' =&gt; [
              'allow' =&gt; [
                  //
              ],
  
              'hashes' =&gt; [
                  // ['sha256' =&gt; 'hash-value'],
              ],
  
              'nonces' =&gt; [
                  //
              ],
  
              'self' =&gt; false,
  
              'unsafe-inline' =&gt; false,
  
              'unsafe-eval' =&gt; false,
          ],
  
          'style-src' =&gt; [
              'allow' =&gt; [
                  //
              ],
  
              'self' =&gt; false,
  
              'unsafe-inline' =&gt; false,
          ],
  
          'img-src' =&gt; [
              'allow' =&gt; [
                  //
              ],
  
              'types' =&gt; [
                  //
              ],
  
              'self' =&gt; false,
  
              'data' =&gt; false,
          ],
  
          /*
           * The following directives are all use 'allow' and 'self' flag.
           *
           * Note: default value of 'self' flag is false.
           */
  
          'font-src' =&gt; [
              //
          ],
  
          'connect-src' =&gt; [
              //
          ],
  
          'form-action' =&gt; [
              //
          ],
  
          'frame-ancestors' =&gt; [
              //
          ],
  
          'media-src' =&gt; [
              //
          ],
  
          'object-src' =&gt; [
              //
          ],
  
          /*
           * plugin-types only support 'allow'.
           */
  
          'plugin-types' =&gt; [
              //
          ],
      ],
  ];
  </code></pre>
  
  <p>When I try to run the application (web request or <code>php artisan</code>), I get the following error:</p>
  
  <pre><code>PHP Fatal error:  Cannot use empty array elements in arrays in C:\Web\myapp\config\secure-headers.php on line 4
  </code></pre>
  
  <p>Of course, line 4 of the file looks totally fine!</p>
  
  <p>What is the issue here?</p>