3v4l.org

run code in 300+ PHP versions simultaneously
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 33
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 33
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
Branch analysis from position: 17
filename:       /in/6B9QS
function name:  (null)
number of ops:  35
compiled vars:  !0 = $i, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   46     0  E >   DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          1        ASSIGN                                                   !0, ~2
   53     2        ECHO                                                     'test+1%3A%0A'
   55     3        INIT_FCALL                                               'slice'
          4        INIT_DYNAMIC_CALL                                        !0
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        SEND_VAL                                                 0
          8        SEND_VAL                                                 3
          9        DO_FCALL                                      0  $5      
         10      > FE_RESET_R                                       $6      $5, ->17
         11    > > FE_FETCH_R                                               $6, !1, ->17
   56    12    >   ROPE_INIT                                     3  ~8      'got+value%3A+'
         13        ROPE_ADD                                      1  ~8      ~8, !1
         14        ROPE_END                                      2  ~7      ~8, '%0A'
         15        ECHO                                                     ~7
   55    16      > JMP                                                      ->11
         17    >   FE_FREE                                                  $6
   59    18        ECHO                                                     'test+2%3A%0A'
   61    19        INIT_FCALL                                               'slice2'
         20        INIT_DYNAMIC_CALL                                        !0
         21        DO_FCALL                                      0  $10     
         22        SEND_VAR                                                 $10
         23        SEND_VAL                                                 0
         24        SEND_VAL                                                 3
         25        DO_FCALL                                      0  $11     
         26      > FE_RESET_R                                       $12     $11, ->33
         27    > > FE_FETCH_R                                               $12, !1, ->33
   62    28    >   ROPE_INIT                                     3  ~14     'got+value%3A+'
         29        ROPE_ADD                                      1  ~14     ~14, !1
         30        ROPE_END                                      2  ~13     ~14, '%0A'
         31        ECHO                                                     ~13
   61    32      > JMP                                                      ->27
         33    >   FE_FREE                                                  $12
   63    34      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
Branch analysis from position: 3
filename:       /in/6B9QS
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $idx
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   46     0  E >   GENERATOR_CREATE                                         
   47     1        ASSIGN                                                   !0, 0
          2      > JMP                                                      ->9
   48     3    >   ROPE_INIT                                     3  ~3      'preprocess+'
          4        ROPE_ADD                                      1  ~3      ~3, !0
          5        ROPE_END                                      2  ~2      ~3, '+%0A'
          6        ECHO                                                     ~2
   49     7        YIELD                                                    !0
   47     8        PRE_INC                                                  !0
          9    >   IS_SMALLER                                               !0, 1000
         10      > JMPNZ                                                    ~7, ->3
   51    11    > > GENERATOR_RETURN                                         

End of Dynamic Function 0

Function slice:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 30
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 30
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 28
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 30
Branch analysis from position: 30
filename:       /in/6B9QS
function name:  slice
number of ops:  32
compiled vars:  !0 = $iterable, !1 = $start, !2 = $length, !3 = $i, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <const ast>
          3        GENERATOR_CREATE                                         
    5     4        IS_SMALLER                                               !1, 0
          5      > JMPZ                                                     ~6, ->10
    6     6    >   NEW                                              $7      'InvalidArgumentException'
          7        SEND_VAL_EX                                              'Start+offset+must+be+non-negative'
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $7
    8    10    >   IS_SMALLER                                               !2, 0
         11      > JMPZ                                                     ~9, ->16
    9    12    >   NEW                                              $10     'InvalidArgumentException'
         13        SEND_VAL_EX                                              'Length+must+be+non-negative'
         14        DO_FCALL                                      0          
         15      > THROW                                         0          $10
   12    16    >   ASSIGN                                                   !3, 0
   13    17      > FE_RESET_R                                       $13     !0, ->30
         18    > > FE_FETCH_R                                       ~14     $13, !4, ->30
         19    >   ASSIGN                                                   !5, ~14
   14    20        ADD                                              ~16     !1, !2
         21        IS_SMALLER_OR_EQUAL                                      ~16, !3
         22      > JMPZ                                                     ~17, ->24
   15    23    > > JMP                                                      ->30
   17    24    >   POST_INC                                         ~18     !3
         25        IS_SMALLER                                               ~18, !1
         26      > JMPZ                                                     ~19, ->28
   18    27    > > JMP                                                      ->18
   20    28    >   YIELD                                                    !4, !5
   13    29      > JMP                                                      ->18
         30    >   FE_FREE                                                  $13
   22    31      > GENERATOR_RETURN                                         

End of function slice

Function slice2:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 30
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 30
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 29
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 30
Branch analysis from position: 30
filename:       /in/6B9QS
function name:  slice2
number of ops:  32
compiled vars:  !0 = $iterable, !1 = $start, !2 = $length, !3 = $i, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <const ast>
          3        GENERATOR_CREATE                                         
   26     4        IS_SMALLER                                               !1, 0
          5      > JMPZ                                                     ~6, ->10
   27     6    >   NEW                                              $7      'InvalidArgumentException'
          7        SEND_VAL_EX                                              'Start+offset+must+be+non-negative'
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $7
   29    10    >   IS_SMALLER                                               !2, 0
         11      > JMPZ                                                     ~9, ->16
   30    12    >   NEW                                              $10     'InvalidArgumentException'
         13        SEND_VAL_EX                                              'Length+must+be+non-negative'
         14        DO_FCALL                                      0          
         15      > THROW                                         0          $10
   33    16    >   ASSIGN                                                   !3, 0
   34    17      > FE_RESET_R                                       $13     !0, ->30
         18    > > FE_FETCH_R                                       ~14     $13, !4, ->30
         19    >   ASSIGN                                                   !5, ~14
   35    20        POST_INC                                         ~16     !3
         21        IS_SMALLER                                               ~16, !1
         22      > JMPZ                                                     ~17, ->24
   36    23    > > JMP                                                      ->18
   38    24    >   YIELD                                                    !4, !5
   40    25        ADD                                              ~19     !1, !2
         26        IS_SMALLER_OR_EQUAL                                      ~19, !3
         27      > JMPZ                                                     ~20, ->29
   41    28    > > JMP                                                      ->30
   34    29    > > JMP                                                      ->18
         30    >   FE_FREE                                                  $13
   44    31      > GENERATOR_RETURN                                         

End of function slice2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
336.99 ms | 1029 KiB | 15 Q