← All docs
ptr_offset()
Returns a new pointer offset from the given pointer by the given byte count.
ptr_offset()
function ptr_offset(pointer $pointer, int $offset): pointer
Returns a new pointer offset from the given pointer by the given byte count.
Parameters:
$pointer(pointer)$offset(int)
Returns: pointer
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/raw_memory/ptr_offset.rs).- Strict PHP mode: hidden — this builtin is an elephc extension with no PHP equivalent, so programs compiled with
--strict-phptreat the name as nonexistent, in compiled code and inside eval’d code.
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how ptr_offset is implemented in the compiler, see the internals page.