title: Missing downcast argument solution in PHP
body: <p>Imagine a generic library defines a class:</p>
  
  <pre><code>class A_CLASS {
      public function foo(B_CLASS $b) {
          // Use $b as B_CLASS
      }
  }
  class B_CLASS {
  }
  </code></pre>
  
  <p>And I need to override this one, but with my own child B_CLASS, so I would declare</p>
  
  <pre><code>class A_CHILD_CLASS extends A_CLASS {
      public function foo(B_CHILD_CLASS $b) {
          parent::foo($b);
          // Use $b as B_CHILD_CLASS
      }
  }
  class B_CHILD_CLASS extends B_CLASS {
  }
  </code></pre>
  
  <p>This is not working on PHP 5.6.
  In other languages, this will work, and we could also use a generic interface.
  But in PHP, this is not available and there is no generic interface.</p>
  
  <p>So, how could I implement it in PHP ?
  This is really a problem in my project.</p>