Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8019111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:17:13+00:00 2026-06-04T21:17:13+00:00

PHP Documentation for getmxrr specifies the syntax as bool getmxrr ( string $hostname ,

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:17:14+00:00Added an answer on June 4, 2026 at 9:17 pm

    That’s not how you should call it; the function declares the reference, it’s not meant to be used at call time.

    $mxhosts = $weight = array(); // not really necessary but good for form :)
    $res = getmxrr('example.com', $mxhosts, $weight);
    // $mxhosts and $weight are populated
    

    See also: http://php.net/manual/en/language.references.pass.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The documentation here is not very clear: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing&s[]=editurl#saverow Do I have to manually make
See this simple piece of code in PHP: //Documentation: //memcache_set ( string $key ,
if (false == 0) echo true\n; // => true While PHP documentation says: var_dump((bool)
There is a function similar_text() in the PHP library. The documentation ( http://php.net/manual/en/function.similar-text.php )
Official PHP documentation states that filter_var_array() supports array filtering in the following format: $data
I came across this function of converting a SimpleXML Object to an array here
Ok, this might be a very noob question, but I find that PHP Documentation
I'd like to capture the output of var_dump to a string. The PHP documentation
PHP's documentation for the proc_open function states that when spawning a child process, you
According to the PHP documentation: The overload() function will enable property and method call

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.