title: PHP opcache reset + symlink-style deployment
body: <p>I am trying to reset PHP opcache after a symlink-style deployment. There is the <code>opcache_reset.php</code> file in my project which is executing by <code>wget</code> after the document root's symlink replacement:</p>
  
  <pre><code>&lt;?php
  clearstatcache(true);
  opcache_reset();
  </code></pre>
  
  <p>In spite of that, the old files are still used. According to <code>opcache_get_status()</code> output, the number of <code>manual_restarts</code> increases, <code>last_restart_time</code> keeps up-to-date, but the file paths remains outdated. I need to call <code>opcache_reset.php</code> manually after a minute or so after deploy to make things right.</p>
  
  <p>PHP version is 5.5.6, ZendOpcache is 7.0.3-dev.
  Opcache config:</p>
  
  <pre><code>opcache.blacklist_filename =&gt; no value
  opcache.consistency_checks =&gt; 0
  opcache.dups_fix =&gt; Off
  opcache.enable =&gt; On
  opcache.enable_cli =&gt; On
  opcache.enable_file_override =&gt; Off
  opcache.error_log =&gt; no value
  opcache.fast_shutdown =&gt; 1
  opcache.force_restart_timeout =&gt; 180
  opcache.inherited_hack =&gt; On
  opcache.interned_strings_buffer =&gt; 8
  opcache.load_comments =&gt; 1
  opcache.log_verbosity_level =&gt; 1
  opcache.max_accelerated_files =&gt; 4000
  opcache.max_file_size =&gt; 0
  opcache.max_wasted_percentage =&gt; 5
  opcache.memory_consumption =&gt; 128
  opcache.optimization_level =&gt; 0xFFFFFFFF
  opcache.preferred_memory_model =&gt; no value
  opcache.protect_memory =&gt; 0
  opcache.restrict_api =&gt; no value
  opcache.revalidate_freq =&gt; 60
  opcache.revalidate_path =&gt; Off
  opcache.save_comments =&gt; 1
  opcache.use_cwd =&gt; On
  opcache.validate_timestamps =&gt; On
  </code></pre>