Category
stdlib
Problem
getmxrr(string $hostname, array &$mxhosts, array &$weight = null): bool is missing. Mail routing and hostname validation code depends on MX lookups; function_exists('getmxrr') is false under bin/vm.php (host PHP has it).
Split from #3258 (A/AAAA/dns_get_record family) so MX work can land independently.
php-src reference
Repro (failure today)
<?php
$hosts = [];
$weights = [];
$ok = getmxrr('example.com', $hosts, $weights);
var_export($ok);
echo "\n", count($hosts), "\n";
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php repro.php'
# Fatal: Call to undefined function getmxrr()
Zend (reference):
php repro.php
# bool(true) and non-empty $hosts on typical resolver
Scope (this repo)
Done when
Verification
./script/ci-fast.sh --filter getmxrr
Related
Category
stdlibProblem
getmxrr(string $hostname, array &$mxhosts, array &$weight = null): boolis missing. Mail routing and hostname validation code depends on MX lookups;function_exists('getmxrr')is false underbin/vm.php(host PHP has it).Split from #3258 (A/AAAA/
dns_get_recordfamily) so MX work can land independently.php-src reference
ext/standard/dns.c—PHP_FUNCTION(getmxrr)ext/standard/basic_functions.c— registration alongsidecheckdnsrrRepro (failure today)
Zend (reference):
php repro.php # bool(true) and non-empty $hosts on typical resolverScope (this repo)
ext/standard/getmxrr.php(new) — VM via hostgetmxrr()initially (same pattern asgethostbynamein Stdlib: gethostbyname() / dns_get_record() / checkdnsrr() — DNS lookups (ext/standard/dns.c parity) #3258)ext/standard/Module.php— register builtindocs/capabilities.mdDone when
$mxhostspopulated as string list;$weightsas int list when passed (Zend subset)falsewhen no MX records (match Zend on test hostname)./script/ci-fast.sh --filter getmxrrgreenVerification
Related
dns_get_record/checkdnsrr/gethostbyname