3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(ticks=1); register_tick_function(function(){ echo "Tick\n"; // if(Fiber::getCurrent() !== null) { // Fiber::suspend(); // } }); for($i = 3; $i--;) { $fibers[$i] = new fiber(function (){ echo "1\n"; echo "2\n"; echo "3\n"; }); $fibers[$i]->start(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 8
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 8
Branch analysis from position: 21
Branch analysis from position: 8
filename:       /in/tGSha
function name:  (null)
number of ops:  23
compiled vars:  !0 = $i, !1 = $fibers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   TICKS                                                    
    5     1        INIT_FCALL                                               'register_tick_function'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtGSha%3A5%240'
   10     3        SEND_VAL                                                 ~2
          4        DO_ICALL                                                 
          5        TICKS                                                    
   13     6        ASSIGN                                                   !0, 3
          7      > JMP                                                      ->19
   15     8    >   NEW                                              $6      'fiber'
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtGSha%3A15%241'
   19    10        SEND_VAL_EX                                              ~7
         11        DO_FCALL                                      0          
   15    12        ASSIGN_DIM                                               !1, !0
   19    13        OP_DATA                                                  $6
         14        TICKS                                                    
   21    15        FETCH_DIM_R                                      ~9      !1, !0
         16        INIT_METHOD_CALL                                         ~9, 'start'
         17        DO_FCALL                                      0          
         18        TICKS                                                    
   13    19    >   POST_DEC                                         ~11     !0
         20      > JMPNZ                                                    ~11, ->8
         21    >   TICKS                                                    
   22    22      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FtGSha%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tGSha
function name:  {closure}
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'Tick%0A'
          1        TICKS                                                    
   10     2      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtGSha%3A5%240

Function %00%7Bclosure%7D%2Fin%2FtGSha%3A15%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tGSha
function name:  {closure}
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ECHO                                                     '1%0A'
          1        TICKS                                                    
   17     2        ECHO                                                     '2%0A'
          3        TICKS                                                    
   18     4        ECHO                                                     '3%0A'
          5        TICKS                                                    
   19     6      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtGSha%3A15%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.92 ms | 1405 KiB | 15 Q