title: How to correctly use `.user.ini`-file in PHP?
body: <p>In my working directory I have two files: <code>index.php</code> and <code>.user.ini</code>:</p>
  
  <p><code>.user.ini</code>:</p>
  
  <pre><code>display_errors=on
  
  ; http://be2.php.net/manual/en/filter.configuration.php#ini.filter.default
  ;filter.default = "full_special_chars"
  </code></pre>
  
  <p><code>index.php</code>:</p>
  
  <pre><code>&lt;?php
  //ini_set("display_errors", "on");
  
  // Use `.user.ini` file:
  // http://php.net/manual/en/configuration.file.per-user.php
  echo "Setting for 'user_ini.filename': " . ini_get("user_ini.filename");
  echo "\n\n";
  
  
  // It takes up to five minutes, until `.user.ini` is re-read:
  echo "Setting for 'user_ini.cache_ttl': " . ini_get("user_ini.cache_ttl");
  echo "\n\n";
  
  // http://php.net/manual/en/function.ini-get.php
  echo "Setting for 'display_errors': " . ini_get("display_errors");
  echo "\n\n";
  echo "Setting for 'filter.default': " . ini_get("filter.default");
  echo "\n\n";
  
  // php -S localhost:8000
  // http://localhost:8000/
  </code></pre>
  
  <p>Using the above <code>.user.ini</code>-file (in my working directory) I expect the <code>"Setting for 'display_errors': "</code> having a value of <code>on</code> or <code>1</code>, but it's empty.</p>
  
  <p>How to correctly change settings using the <code>.user.ini</code>-file?</p>
  
  <p>running <code>php --ini</code> results in</p>
  
  <pre><code>Configuration File (php.ini) Path: /etc/php5/cli
  Loaded Configuration File:         /etc/php5/cli/php.ini
  Scan for additional .ini files in: /etc/php5/cli/conf.d
  Additional .ini files parsed:      /etc/php5/cli/conf.d/05-opcache.ini,
  /etc/php5/cli/conf.d/10-pdo.ini,
  /etc/php5/cli/conf.d/20-json.ini,
  /etc/php5/cli/conf.d/20-readline.ini
  </code></pre>
  
  <p>which does not contain my <code>.user.ini</code>-file.</p>
  
  <p>Explicitly adding the <code>.user.ini</code>-file works:</p>
  
  <pre><code>php --php-ini .user.ini index.php
  </code></pre>
  
  <p>but I'd like it to be automatically read when running the script from a given folder.</p>