title: Type casting in PHP - security and efficiency
body: <p>I understand that PHP is a weakly-typed language. My question is: on balance, is it desirable to initialise variables in PHP as specific types, having regard to security and efficiency concerns? Or would this be swimming needlessly against the tide?</p>
  
  <p>Examples of specific initialisations:</p>
  
  <pre><code>$name = (string) "PHP"; // string
  $pizzaToppings = array("tomato", "cheese", "pepperoni"); // array
  $angle = (integer) 60; // integer
  </code></pre>
  
  <p>The following article has helped, but not answered, my question:
  <a href="https://stackoverflow.com/questions/3695295/php-typecasting-good-or-bad">PHP Typecasting - Good or bad?</a></p>