Since you're trying to pass different type of data type, I would check the argument if its int, string, array or even an object and complete the logic based on the data type
Example:
class Student {
public function __construct($data) {
if (is_int($data)) {
// Construct from id
} elseif (is_object($data)) {
// Construct from object of row_from_database
}
}
}