title: close current browser tab in Yii2
body: <ol>
  <li><p>I have tried below pieces of code to close current browser tab but none are working. </p></li>
  <li><p>In fact they behave in yii2 way and try to navigate to same Controller/Action.</p>
  
  <pre><code>&lt;a href='' onclick="window.close()" class="btn btn-danger"&gt;Click to Close&lt;/a&gt;
  
  &lt;a href='#' onclick="window.close()" class="btn btn-danger"&gt;Click to Close&lt;/a&gt;
  </code></pre></li>
  </ol>
  
  <p>The View in which above code is written is a PHP page. any help?</p>