3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myfunc($param1, $param2) { echo "In first tick function with params $param1 $param2\n"; } function myfunc2($param1, $param2, $param3) { echo "In second tick function with params $param1 $param2 $param3\n"; } function myfunc3($param1) { echo "In third tick function with params $param1\n"; } register_tick_function("myfunc", "hello", "world"); register_tick_function("myfunc2", "how", "are", "you?"); register_tick_function("myfunc3", "goodbye!"); unregister_tick_function("myfunc2"); declare(ticks=10); for($i = 0; $i < 20; ++$i) { echo "Hello\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 21
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 21
Branch analysis from position: 26
Branch analysis from position: 21
filename:       /in/ldNYf
function name:  (null)
number of ops:  28
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'register_tick_function'
          1        SEND_VAL                                                 'myfunc'
          2        SEND_VAL                                                 'hello'
          3        SEND_VAL                                                 'world'
          4        DO_ICALL                                                 
   15     5        INIT_FCALL                                               'register_tick_function'
          6        SEND_VAL                                                 'myfunc2'
          7        SEND_VAL                                                 'how'
          8        SEND_VAL                                                 'are'
          9        SEND_VAL                                                 'you%3F'
         10        DO_ICALL                                                 
   16    11        INIT_FCALL                                               'register_tick_function'
         12        SEND_VAL                                                 'myfunc3'
         13        SEND_VAL                                                 'goodbye%21'
         14        DO_ICALL                                                 
   17    15        INIT_FCALL                                               'unregister_tick_function'
         16        SEND_VAL                                                 'myfunc2'
         17        DO_ICALL                                                 
   19    18        TICKS                                                    
   20    19        ASSIGN                                                   !0, 0
         20      > JMP                                                      ->24
   21    21    >   ECHO                                                     'Hello%0A'
         22        TICKS                                                    
   20    23        PRE_INC                                                  !0
         24    >   IS_SMALLER                                               !0, 20
         25      > JMPNZ                                                    ~7, ->21
         26    >   TICKS                                                    
   22    27      > RETURN                                                   1

Function myfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ldNYf
function name:  myfunc
number of ops:  9
compiled vars:  !0 = $param1, !1 = $param2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        ROPE_INIT                                     5  ~3      'In+first+tick+function+with+params+'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_ADD                                      2  ~3      ~3, '+'
          5        ROPE_ADD                                      3  ~3      ~3, !1
          6        ROPE_END                                      4  ~2      ~3, '%0A'
          7        ECHO                                                     ~2
    4     8      > RETURN                                                   null

End of function myfunc

Function myfunc2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ldNYf
function name:  myfunc2
number of ops:  12
compiled vars:  !0 = $param1, !1 = $param2, !2 = $param3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    7     3        ROPE_INIT                                     7  ~4      'In+second+tick+function+with+params+'
          4        ROPE_ADD                                      1  ~4      ~4, !0
          5        ROPE_ADD                                      2  ~4      ~4, '+'
          6        ROPE_ADD                                      3  ~4      ~4, !1
          7        ROPE_ADD                                      4  ~4      ~4, '+'
          8        ROPE_ADD                                      5  ~4      ~4, !2
          9        ROPE_END                                      6  ~3      ~4, '%0A'
         10        ECHO                                                     ~3
    8    11      > RETURN                                                   null

End of function myfunc2

Function myfunc3:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ldNYf
function name:  myfunc3
number of ops:  6
compiled vars:  !0 = $param1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        ROPE_INIT                                     3  ~2      'In+third+tick+function+with+params+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%0A'
          4        ECHO                                                     ~1
   12     5      > RETURN                                                   null

End of function myfunc3

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.87 ms | 1400 KiB | 17 Q