title: PHP: Only variables can be passed by reference
body: <p>I am getting this error on line 57: <code>$password = str_replace($key, $value, $password, 1);</code></p>
  
  <p>As far as I can tell, I am only passing in variables. Here is some more context:</p>
  
  <pre><code>$replace_count = 0;
  foreach($replacables as $key =&gt; $value)
  {
      if($replace_count &gt;= 2)
          break;
      if(strpos($password, $key) !== false)
      {
          $password = str_replace($key, $value, $password, 1);
          $replace_count++;
      }
  
  }
  </code></pre>