inet_pton()
function inet_pton(string $ip): mixed
Converts a human-readable IP address to its packed in_addr representation.
Parameters:
$ip(string)
Returns: mixed
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/network_env/inet_pton.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how inet_pton is implemented in the compiler, see the internals page.