title: Type hinting in PHP constructors?
body: <p>Is there anything to stop me from type hinting like this within the <code>__construct()</code> parentheses?</p>
  
  <pre><code>&lt;?php
  
      class SomeClass extends BaseClass {
  
          public function __construct(array $someArray) {
  
              parent::__construct($someArray);
          }
  </code></pre>
  
  <p>Or can I only do it like this?</p>
  
  <pre><code>&lt;?php
  
      class SomeClass extends BaseClass {
  
          public function __construct($someArray = array()) {
  
              parent::__construct($someArray);
          }
  </code></pre>
  
  <p><strong>Edit:</strong></p>
  
  <p>This is what works: (Thanks @hakra and @Leigh)</p>
  
  <pre><code>&lt;?php
  
      class SomeClass extends BaseClass {
  
          public function __construct( array $someArray = NULL ) {
  
              parent::__construct( (array) $someArray);
          }
  </code></pre>
  
  <p>To me it looks nice and clean and I know exactly what it supposed to mean.</p>