gethostbyname()
function gethostbyname(string $hostname): string
Gets the IPv4 address corresponding to the given Internet host name.
Parameters:
$hostname(string)
Returns: string
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/network_env/gethostbyname.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how gethostbyname is implemented in the compiler, see the internals page.