PHP Exception::getCode() contradicts Throwable interface that it implements
问题 I've found a contradiction I could not understand. Exception::getCode() has this definition: final public Exception::getCode ( void ) : mixed with description: Returns the exception code as integer in Exception but possibly as other type in Exception descendants (for example as string in PDOException) but the Exception class implements Throwable interface that defines: abstract public getCode ( void ) : int So how for an example PDOException as a descendant of Exception could return string