title: Difference between array_push() and $array[] =
body: <p>In the PHP manual, (<a href="http://php.net/manual/en/function.array-push.php" rel="noreferrer">array_push</a>) says..</p>
  
  <blockquote>
    <p>If you use <strong>array_push()</strong> to add one element to the array it's better to
    use <strong>$array[] =</strong> because in that way there is no overhead of calling a
    function.</p>
  </blockquote>
  
  <p>For example :</p>
  
  <pre><code>$arr = array();
  array_push($arr, "stackoverflow");
  print_r($arr);
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>$arr[] = "stackoverflow";
  print_r($arr);
  </code></pre>
  
  <p>I don't understand why there is a big difference.</p>