MCPcopy Create free account
hub / github.com/VKCOM/kphp / process_varargs

Method process_varargs

compiler/pipes/check-func-calls-and-vararg.cpp:40–159  ·  view source on GitHub ↗

calling a function with variadic arguments involves some transformations: function fun($x, ...$args) transformations will be: fun(1, 2, 3) -> fun(1, [2, 3]) fun(1, ...$arr) -> fun(1, $arr) fun(1, 2, 3, ...$arr1, ...$arr2) -> fun(1, array_merge([2, 3], $arr1, $arr2)) here we also deal with unpacking fixed-size arrays into positional arguments: fun(...[1]) -> fun(1) fun(...[1,2]) -> fun(1, [2]) fun(

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 10

reserveMethod · 0.80
get_paramsMethod · 0.80
sizeMethod · 0.45
typeMethod · 0.45
set_locationMethod · 0.45
arrayMethod · 0.45
varMethod · 0.45
emptyMethod · 0.45
frontMethod · 0.45
get_functionMethod · 0.45

Tested by

no test coverage detected