PHP - Manual: FETCH_DIM_FUNC_ARG
2024-12-26
<?php
/*
*
* opcode number: 93
*/
function foo(&$x)
{
print($x);
}
$x = array(0, 1, 2, 3, 4, 5);
$z = "foo";
$z($x[0]);
?>
Function name: (null)
Compiled variables: !0=$x, !1=$z
line | # | op | fetch | ext | return | operands |
---|---|---|---|---|---|---|
7 | 0 | NOP | ||||
12 | 1 | INIT_ARRAY | ~0 | 0 | ||
2 | ADD_ARRAY_ELEMENT | ~0 | 1 | |||
3 | ADD_ARRAY_ELEMENT | ~0 | 2 | |||
4 | ADD_ARRAY_ELEMENT | ~0 | 3 | |||
5 | ADD_ARRAY_ELEMENT | ~0 | 4 | |||
6 | ADD_ARRAY_ELEMENT | ~0 | 5 | |||
7 | ASSIGN | !0,~0 | ||||
13 | 8 | ASSIGN | !1,'foo' | |||
15 | 9 | INIT_FCALL_BY_NAME | !1 | |||
10 | FETCH_DIM_FUNC_ARG | $3 | !0,0 | |||
11 | SEND_VAR | $3 | ||||
12 | DO_FCALL_BY_NAME | 1 | ||||
17 | 13 | RETURN | 1 |
Function name: foo
Compiled variables: !0=$x
line | # | op | fetch | ext | return | operands |
---|---|---|---|---|---|---|
7 | 0 | RECV | 1 | |||
9 | 1 | ~0 | !0 | |||
2 | FREE | ~0 | ||||
10 | 3 | RETURN | null |
官方地址:https://www.php.net/manual/en/internals2.opcodes.fetch-dim-func-arg.php