<?php
/*
*
* opcode number: 105
*/
// A function that records the time when it is called
function profile()
{
echo "profile function is called\n";
}
// Set up a tick handler
register_tick_function("profile");
// Initialize the function before the declare block
profile();
// Run a block of code, throw a tick every 2nd statement
declare(ticks=2) {
for ($x = 0; $x < 10; ++$x) {
echo "hello world\n";
}
}
?>
Function name: (null)
Compiled variables: !0=$x
line | # | op | fetch | ext | return | operands |
---|---|---|---|---|---|---|
7 | 0 | NOP | В | В | В | В |
13 | 1 | SEND_VAL | В | В | В | 'profile' |
В | 2 | DO_FCALL | В | 1 | В | 'register_tick_function' |
16 | 3 | DO_FCALL | В | 0 | В | 'profile' |
20 | 4 | ASSIGN | В | В | В | !0,0 |
В | 5 | IS_SMALLER | В | В | ~3 | !0,10 |
В | 6 | JMPZNZ | В | 9 | В | ~3,->13 |
В | 7 | PRE_INC | В | В | В | !0 |
В | 8 | JMP | В | В | В | ->5 |
21 | 9 | ECHO | В | В | В | 'hello+world%0A' |
В | 10 | TICKS | В | В | В | 2 |
22 | 11 | TICKS | В | В | В | 2 |
В | 12 | JMP | В | В | В | ->7 |
В | 13 | TICKS | В | В | В | 2 |
23 | 14 | TICKS | В | В | В | 2 |
24 | 15 | RETURN | В | В | В | 1 |
Function name: profile
Compiled variables: none
line | # | op | fetch | ext | return | operands |
---|---|---|---|---|---|---|
9 | 0 | ECHO | В | В | В | 'profile+function+is+called%0A' |
10 | 1 | RETURN | В | В | В | null |