3v4l.org

run code in 300+ PHP versions simultaneously
<?php class gogu { protected static function highlightToken($token) { $type = $token[self::TOKEN_TYPE]; $token = htmlentities($token[self::TOKEN_VALUE]); if($type===self::TOKEN_TYPE_BOUNDARY) { return self::highlightBoundary($token); } elseif($type===self::TOKEN_TYPE_WORD) { return self::highlightWord($token); } elseif($type===self::TOKEN_TYPE_BACKTICK_QUOTE) { return self::highlightBacktickQuote($token); } elseif($type===self::TOKEN_TYPE_QUOTE) { return self::highlightQuote($token); } elseif($type===self::TOKEN_TYPE_RESERVED) { return self::highlightReservedWord($token); } elseif($type===self::TOKEN_TYPE_SPECIAL_RESERVED) { return self::highlightReservedWord($token); } elseif($type===self::TOKEN_TYPE_NUMBER) { return self::highlightNumber($token); } elseif($type===self::TOKEN_TYPE_COMMENT || $type===self::TOKEN_TYPE_BLOCK_COMMENT) { return self::highlightComment($token); } return $token; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tuv05
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E > > RETURN                                                   1

Class gogu:
Function highlighttoken:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 34
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 42
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 50
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
2 jumps found. (Code = 43) Position 1 = 53, Position 2 = 58
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 66
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 66
2 jumps found. (Code = 47) Position 1 = 69, Position 2 = 72
Branch analysis from position: 69
2 jumps found. (Code = 43) Position 1 = 73, Position 2 = 77
Branch analysis from position: 73
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 77
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 72
filename:       /in/tuv05
function name:  highlightToken
number of ops:  79
compiled vars:  !0 = $token, !1 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        FETCH_CLASS_CONSTANT                             ~2      'TOKEN_TYPE'
          2        FETCH_DIM_R                                      ~3      !0, ~2
          3        ASSIGN                                                   !1, ~3
    6     4        INIT_FCALL                                               'htmlentities'
          5        FETCH_CLASS_CONSTANT                             ~5      'TOKEN_VALUE'
          6        FETCH_DIM_R                                      ~6      !0, ~5
          7        SEND_VAL                                                 ~6
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !0, $7
    8    10        FETCH_CLASS_CONSTANT                             ~9      'TOKEN_TYPE_BOUNDARY'
         11        IS_IDENTICAL                                             !1, ~9
         12      > JMPZ                                                     ~10, ->18
    9    13    >   INIT_STATIC_METHOD_CALL                                  'highlightBoundary'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0  $11     
         16      > RETURN                                                   $11
         17*       JMP                                                      ->77
   11    18    >   FETCH_CLASS_CONSTANT                             ~12     'TOKEN_TYPE_WORD'
         19        IS_IDENTICAL                                             !1, ~12
         20      > JMPZ                                                     ~13, ->26
   12    21    >   INIT_STATIC_METHOD_CALL                                  'highlightWord'
         22        SEND_VAR_EX                                              !0
         23        DO_FCALL                                      0  $14     
         24      > RETURN                                                   $14
         25*       JMP                                                      ->77
   14    26    >   FETCH_CLASS_CONSTANT                             ~15     'TOKEN_TYPE_BACKTICK_QUOTE'
         27        IS_IDENTICAL                                             !1, ~15
         28      > JMPZ                                                     ~16, ->34
   15    29    >   INIT_STATIC_METHOD_CALL                                  'highlightBacktickQuote'
         30        SEND_VAR_EX                                              !0
         31        DO_FCALL                                      0  $17     
         32      > RETURN                                                   $17
         33*       JMP                                                      ->77
   17    34    >   FETCH_CLASS_CONSTANT                             ~18     'TOKEN_TYPE_QUOTE'
         35        IS_IDENTICAL                                             !1, ~18
         36      > JMPZ                                                     ~19, ->42
   18    37    >   INIT_STATIC_METHOD_CALL                                  'highlightQuote'
         38        SEND_VAR_EX                                              !0
         39        DO_FCALL                                      0  $20     
         40      > RETURN                                                   $20
         41*       JMP                                                      ->77
   20    42    >   FETCH_CLASS_CONSTANT                             ~21     'TOKEN_TYPE_RESERVED'
         43        IS_IDENTICAL                                             !1, ~21
         44      > JMPZ                                                     ~22, ->50
   21    45    >   INIT_STATIC_METHOD_CALL                                  'highlightReservedWord'
         46        SEND_VAR_EX                                              !0
         47        DO_FCALL                                      0  $23     
         48      > RETURN                                                   $23
         49*       JMP                                                      ->77
   23    50    >   FETCH_CLASS_CONSTANT                             ~24     'TOKEN_TYPE_SPECIAL_RESERVED'
         51        IS_IDENTICAL                                             !1, ~24
         52      > JMPZ                                                     ~25, ->58
   24    53    >   INIT_STATIC_METHOD_CALL                                  'highlightReservedWord'
         54        SEND_VAR_EX                                              !0
         55        DO_FCALL                                      0  $26     
         56      > RETURN                                                   $26
         57*       JMP                                                      ->77
   26    58    >   FETCH_CLASS_CONSTANT                             ~27     'TOKEN_TYPE_NUMBER'
         59        IS_IDENTICAL                                             !1, ~27
         60      > JMPZ                                                     ~28, ->66
   27    61    >   INIT_STATIC_METHOD_CALL                                  'highlightNumber'
         62        SEND_VAR_EX                                              !0
         63        DO_FCALL                                      0  $29     
         64      > RETURN                                                   $29
         65*       JMP                                                      ->77
   29    66    >   FETCH_CLASS_CONSTANT                             ~30     'TOKEN_TYPE_COMMENT'
         67        IS_IDENTICAL                                     ~31     !1, ~30
         68      > JMPNZ_EX                                         ~31     ~31, ->72
         69    >   FETCH_CLASS_CONSTANT                             ~32     'TOKEN_TYPE_BLOCK_COMMENT'
         70        IS_IDENTICAL                                     ~33     !1, ~32
         71        BOOL                                             ~31     ~33
         72    > > JMPZ                                                     ~31, ->77
   30    73    >   INIT_STATIC_METHOD_CALL                                  'highlightComment'
         74        SEND_VAR_EX                                              !0
         75        DO_FCALL                                      0  $34     
         76      > RETURN                                                   $34
   33    77    > > RETURN                                                   !0
   34    78*     > RETURN                                                   null

End of function highlighttoken

End of class gogu.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.49 ms | 1404 KiB | 15 Q