← All docs
pfsockopen() — internals
Compiler internals for pfsockopen(): lowering path, type checks, and runtime helpers.
pfsockopen() — internals
Where it lives
- Signature:
src/builtins/io/pfsockopen.rs - Lowering:
src/codegen/lower_inst/builtins/io.rs:3640 (lower_fsockopen) - Function symbol:
lower_fsockopen()
Lowering notes
- Lowers
fsockopen(host, port, errno?, errstr?, timeout?).
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function pfsockopen(string $hostname, int $port, int $error_code = null, string $error_message = null, float $timeout = null): mixed
What the type checker enforces
- Arity: takes 2–5 arguments (3 optional).
- By-reference parameters:
$error_code,$error_message.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/filesystem/pfsockopen.rs(eval_builtin!) - Dispatch hooks:
values - By-reference parameters:
$error_code,$error_message.