title: PHP - override function with different number of parameters
body: <p>I'm extending a class, but in some scenarios I'm overriding a method. Sometimes in 2 parameters, sometimes in 3, sometimes without parameters.</p>
  
  <p>Unfortunately I'm getting a PHP warning.</p>
  
  <p>My minimum verifiable example:
  <a href="http://pastebin.com/6MqUX9Ui" rel="noreferrer">http://pastebin.com/6MqUX9Ui</a></p>
  
  <pre><code>&lt;?php
  
  class first {
      public function something($param1) {
          return 'first-'.$param1;
      }
  }
  
  class second extends first {
      public function something($param1, $param2) {
          return 'second params=('.$param1.','.$param2.')';
      }
  }
  
  // Strict standards: Declaration of second::something() should be compatible with that of first::something() in /home/szymon/webs/wildcard/www/source/public/override.php on line 13
  
  $myClass = new Second();
  var_dump( $myClass-&gt;something(123,456) );
  </code></pre>
  
  <p>I'm getting PHP error/warning/info:
  <img src="https://i.stack.imgur.com/Kg9VN.png" alt="error screen"></p>
  
  <p>How can I prevent errors like this?</p>