PHP Documentation for getmxrr specifies the syntax as
bool getmxrr ( string $hostname , array &$mxhosts [, array &$weight ] )
This function is not depreciated (not replaced by a more favored one). However, when using the function as described, I get this warning:
Deprecated: Call-time pass-by-reference has been deprecated in
path/to/script on line n
So, how should this utility be used without causing PHP to complain?
And isn’t it absurd the language frowns at its own prescription?
That’s not how you should call it; the function declares the reference, it’s not meant to be used at call time.
See also: http://php.net/manual/en/language.references.pass.php