$timeout is a default parameter that can be overwritten when calling the function.
$errnum and $errstr cannot be overwritten when calling the function.
Observe:
public function goodConstruct($host, $port, $timeout = 5){
$errnum = 0;
$errstr = '';
}
goodConstruct('hostname',8443,60);
By doing this, I can overwrite the default timeout.
public function badConstruct($host, $port, $errnum = 0, $errstr = '', $timeout = 5)
{
//code
}
badConstruct('hostname',8443,99,'hey look at this silly error!!!!',900);
Now I can also overwrite the error code (assuming that's the purpose of errnum, it's even worse if that's some sort of a counter) and the error string. Do you really want to be able to control this from your function call? Probably not... I assume that you'd want that to be fixed.