3v4l.org

run code in 300+ PHP versions simultaneously
<?php function RC($flags = ""){ return new RegCode($flags); } class RegCodeFn { public static function escape($s){ return preg_replace("/[\\/\\\\\\^\\[\\]\\.\\$\\{\\}\\*\\+\\(\\)\\|\\?\\<\\>]/", "\\\\$0", $s); } public static function compileArr($chain){ $l = count($chain); $code = ""; for ($i=0; $i < $l; $i++) { $code .= RegCodeFn::compile($chain[$i],($i + 1) < $l ? $chain[$i+1]['type'] == 'repeat' : false); } return $code; } public static function compile($item, $repeatNext){ switch ($item['type']) { case 'range': return '[' . ($item['not']?'^':'') . $item['allowed'] . ']'; break; case 'group': $res = RegCodeFn::compileArr($item['chain']); return '(' . ($item['assertion']?$item['assertion']:'') . ($item['name']?(($item['assertion']?'':'?') . 'P<' . $item['name'] . '>' ):'') . $res['code'] . ')'; break; case 'raw': case 'text': if($repeatNext && strlen($item['code']) > 1 && !(strlen($item['code']) == 2 && $item['code'][1] == '\\')){ return '(?:' . $item['code'] . ')'; }else{ return $item['code']; } break; case 'any': return "."; break; case 'end': return '$'; break; case 'start': return '^'; break; case 'repeat': return $item['code']; break; } } } class RegCode { public $flags; public $chain; public function __construct($flags = ""){ if(is_string($flags)){ $this->flags = $flags?$flags:""; }else{ $this->flags = $flags->flags; $this->chain = clone $flags->chain; } } public function start(){ $this->chain[] = array('type'=>"start"); return $this; } public function end(){ $this->chain[] = array('type'=>"end"); return $this; } public function range($allowed, $escape = true){ if($escape) $allowed = RegCodeFn::escape($allowed); $this->chain[] = array( 'type'=>'range', 'not'=>false, "allowed"=>$allowed ); return $this; } public function notRange($allowed, $escape = true){ if($escape == null) $escape = true; if($escape) $allowed = RegCodeFn::escape($allowed); $this->chain[] = array( 'type'=>'range', 'not'=>true, "allowed"=>$allowed ); return $this; } public function group($name, $assertion = null, $chain = null){ $chain = $chain == null?($assertion == null ? $name : $assertion):$chain; $assertion = is_string($assertion) ? $assertion : false; $name = is_string($name) ? $name : false; $this->chain[] = array( 'type'=>'group', 'assertion'=>$assertion, 'name'=>$name, 'chain'=>$chain->chain ); return $this; } public function any(){ $this->chain[] = array("type"=>'any'); return $this; } public function repeat($min, $max = false){ $code = ($min == '?' && $min == '*' && $min == '+')?$min:'{'.($min?$min:0) . ($max===false?'':',' . ($max?$max:'')) . '}'; $this->chain[] = array( "type"=>"repeat", "code"=>$code ); return $this; } public function raw($code){ $this->chain[] = array( "type"=>'raw', "code"=>$code ); return $this; } public function text($text,$escape){ if($escape == null) $escape = true; $this->chain[] = array( 'type'=>'text', "code"=>$escape?RegCodeFn::escape($text):$text ); return $this; } public function __toString(){ return "/" . RegCodeFn::compileArr($this->chain) . "/" . $this->flags; } public function compile(){ return new RegCodeCompiled(RegCodeFn::compileArr($this->chain), $this->flags); } } class RegCodeCompiled { public $code; public $flags; public function __construct($code, $flags){ $this->code = $code; $this->flags = $flags; } public function match($subject, &$matches = null, $flags = 0, $offset = 0){ return preg_match("/" . $this->code . "/" . $this->flags, $subject, $matches, $flags, $offset); } public function match_all(){ } public function replace($replacement, $subject, $limit = -1, &$count = null){ return preg_replace("/" . $this->code . "/" . $this->flags, $replacement, $subject, $limit, $count); } public function replace_callback($callback, $subject, $limit = -1, &$count = null){ return preg_replace_callback("/" . $this->code . "/" . $this->flags, $callback, $subject, $limit, $count); } } echo RC() ->start() ->range('a-z') ->range('a-z0-9')->repeat(3,null) ->end()->compile()->match("all3");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V1tli
function name:  (null)
number of ops:  24
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   55     0  E >   DECLARE_CLASS                                            'regcode'
  176     1        INIT_FCALL                                               'rc'
          2        DO_FCALL                                      0  $0      
  177     3        INIT_METHOD_CALL                                         $0, 'start'
          4        DO_FCALL                                      0  $1      
  178     5        INIT_METHOD_CALL                                         $1, 'range'
          6        SEND_VAL_EX                                              'a-z'
          7        DO_FCALL                                      0  $2      
  179     8        INIT_METHOD_CALL                                         $2, 'range'
          9        SEND_VAL_EX                                              'a-z0-9'
         10        DO_FCALL                                      0  $3      
         11        INIT_METHOD_CALL                                         $3, 'repeat'
         12        SEND_VAL_EX                                              3
         13        SEND_VAL_EX                                              null
         14        DO_FCALL                                      0  $4      
  180    15        INIT_METHOD_CALL                                         $4, 'end'
         16        DO_FCALL                                      0  $5      
         17        INIT_METHOD_CALL                                         $5, 'compile'
         18        DO_FCALL                                      0  $6      
         19        INIT_METHOD_CALL                                         $6, 'match'
         20        SEND_VAL_EX                                              'all3'
         21        DO_FCALL                                      0  $7      
         22        ECHO                                                     $7
         23      > RETURN                                                   1

Function rc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V1tli
function name:  RC
number of ops:  6
compiled vars:  !0 = $flags
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      ''
    3     1        NEW                                              $1      'RegCode'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   $1
    4     5*     > RETURN                                                   null

End of function rc

Class RegCodeFn:
Function escape:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V1tli
function name:  escape
number of ops:  8
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5B%5C%2F%5C%5C%5C%5E%5C%5B%5C%5D%5C.%5C%24%5C%7B%5C%7D%5C%2A%5C%2B%5C%28%5C%29%5C%7C%5C%3F%5C%3C%5C%3E%5D%2F'
          3        SEND_VAL                                                 '%5C%5C%240'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
   10     7*     > RETURN                                                   null

End of function escape

Function compilearr:
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 = 6
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 6
Branch analysis from position: 26
Branch analysis from position: 6
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 6
Branch analysis from position: 26
Branch analysis from position: 6
filename:       /in/V1tli
function name:  compileArr
number of ops:  28
compiled vars:  !0 = $chain, !1 = $l, !2 = $code, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        COUNT                                            ~4      !0
          2        ASSIGN                                                   !1, ~4
   14     3        ASSIGN                                                   !2, ''
   15     4        ASSIGN                                                   !3, 0
          5      > JMP                                                      ->24
   16     6    >   INIT_STATIC_METHOD_CALL                                  'RegCodeFn', 'compile'
          7        CHECK_FUNC_ARG                                           
          8        FETCH_DIM_FUNC_ARG                               $8      !0, !3
          9        SEND_FUNC_ARG                                            $8
         10        ADD                                              ~9      !3, 1
         11        IS_SMALLER                                               ~9, !1
         12      > JMPZ                                                     ~10, ->19
         13    >   ADD                                              ~11     !3, 1
         14        FETCH_DIM_R                                      ~12     !0, ~11
         15        FETCH_DIM_R                                      ~13     ~12, 'type'
         16        IS_EQUAL                                         ~14     ~13, 'repeat'
         17        QM_ASSIGN                                        ~15     ~14
         18      > JMP                                                      ->20
         19    >   QM_ASSIGN                                        ~15     <false>
         20    >   SEND_VAL_EX                                              ~15
         21        DO_FCALL                                      0  $16     
         22        ASSIGN_OP                                     8          !2, $16
   15    23        PRE_INC                                                  !3
         24    >   IS_SMALLER                                               !3, !1
         25      > JMPNZ                                                    ~19, ->6
   18    26    > > RETURN                                                   !2
   19    27*     > RETURN                                                   null

End of function compilearr

Function compile:
Finding entry points
Branch analysis from position: 0
10 jumps found. (Code = 188) Position 1 = 21, Position 2 = 33, Position 3 = 66, Position 4 = 66, Position 5 = 93, Position 6 = 96, Position 7 = 99, Position 8 = 102, Position 9 = 106, Position 10 = 4
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 43
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 58
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 51
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 59
Branch analysis from position: 59
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 59
Branch analysis from position: 59
Branch analysis from position: 58
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 58
Branch analysis from position: 47
Branch analysis from position: 58
Branch analysis from position: 66
2 jumps found. (Code = 46) Position 1 = 67, Position 2 = 71
Branch analysis from position: 67
2 jumps found. (Code = 46) Position 1 = 72, Position 2 = 82
Branch analysis from position: 72
2 jumps found. (Code = 46) Position 1 = 76, Position 2 = 80
Branch analysis from position: 76
2 jumps found. (Code = 43) Position 1 = 83, Position 2 = 89
Branch analysis from position: 83
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 89
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 80
Branch analysis from position: 82
Branch analysis from position: 71
Branch analysis from position: 66
Branch analysis from position: 93
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 96
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 99
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 102
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 106
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 21
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 33
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 66
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 66
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 93
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 96
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 99
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 102
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 106
Branch analysis from position: 106
Branch analysis from position: 102
Branch analysis from position: 99
Branch analysis from position: 96
Branch analysis from position: 93
Branch analysis from position: 66
Branch analysis from position: 66
Branch analysis from position: 33
Branch analysis from position: 21
filename:       /in/V1tli
function name:  compile
number of ops:  108
compiled vars:  !0 = $item, !1 = $repeatNext, !2 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   22     2        FETCH_DIM_R                                      ~3      !0, 'type'
          3      > SWITCH_STRING                                            ~3, [ 'range':->21, 'group':->33, 'raw':->66, 'text':->66, 'any':->93, 'end':->96, 'start':->99, 'repeat':->102, ], ->106
   23     4    >   CASE                                                     ~3, 'range'
          5      > JMPNZ                                                    ~4, ->21
   26     6    >   CASE                                                     ~3, 'group'
          7      > JMPNZ                                                    ~4, ->33
   30     8    >   CASE                                                     ~3, 'raw'
          9      > JMPNZ                                                    ~4, ->66
   31    10    >   CASE                                                     ~3, 'text'
         11      > JMPNZ                                                    ~4, ->66
   38    12    >   CASE                                                     ~3, 'any'
         13      > JMPNZ                                                    ~4, ->93
   41    14    >   CASE                                                     ~3, 'end'
         15      > JMPNZ                                                    ~4, ->96
   44    16    >   CASE                                                     ~3, 'start'
         17      > JMPNZ                                                    ~4, ->99
   47    18    >   CASE                                                     ~3, 'repeat'
         19      > JMPNZ                                                    ~4, ->102
         20    > > JMP                                                      ->106
   24    21    >   FETCH_DIM_R                                      ~5      !0, 'not'
         22      > JMPZ                                                     ~5, ->25
         23    >   QM_ASSIGN                                        ~6      '%5E'
         24      > JMP                                                      ->26
         25    >   QM_ASSIGN                                        ~6      ''
         26    >   CONCAT                                           ~7      '%5B', ~6
         27        FETCH_DIM_R                                      ~8      !0, 'allowed'
         28        CONCAT                                           ~9      ~7, ~8
         29        CONCAT                                           ~10     ~9, '%5D'
         30        FREE                                                     ~3
         31      > RETURN                                                   ~10
   25    32*       JMP                                                      ->106
   27    33    >   INIT_STATIC_METHOD_CALL                                  'RegCodeFn', 'compileArr'
         34        FETCH_DIM_R                                      ~11     !0, 'chain'
         35        SEND_VAL                                                 ~11
         36        DO_FCALL                                      0  $12     
         37        ASSIGN                                                   !2, $12
   28    38        FETCH_DIM_R                                      ~14     !0, 'assertion'
         39      > JMPZ                                                     ~14, ->43
         40    >   FETCH_DIM_R                                      ~15     !0, 'assertion'
         41        QM_ASSIGN                                        ~16     ~15
         42      > JMP                                                      ->44
         43    >   QM_ASSIGN                                        ~16     ''
         44    >   CONCAT                                           ~17     '%28', ~16
         45        FETCH_DIM_R                                      ~18     !0, 'name'
         46      > JMPZ                                                     ~18, ->58
         47    >   FETCH_DIM_R                                      ~19     !0, 'assertion'
         48      > JMPZ                                                     ~19, ->51
         49    >   QM_ASSIGN                                        ~20     ''
         50      > JMP                                                      ->52
         51    >   QM_ASSIGN                                        ~20     '%3F'
         52    >   CONCAT                                           ~21     ~20, 'P%3C'
         53        FETCH_DIM_R                                      ~22     !0, 'name'
         54        CONCAT                                           ~23     ~21, ~22
         55        CONCAT                                           ~24     ~23, '%3E'
         56        QM_ASSIGN                                        ~25     ~24
         57      > JMP                                                      ->59
         58    >   QM_ASSIGN                                        ~25     ''
         59    >   CONCAT                                           ~26     ~17, ~25
         60        FETCH_DIM_R                                      ~27     !2, 'code'
         61        CONCAT                                           ~28     ~26, ~27
         62        CONCAT                                           ~29     ~28, '%29'
         63        FREE                                                     ~3
         64      > RETURN                                                   ~29
   29    65*       JMP                                                      ->106
   32    66    > > JMPZ_EX                                          ~30     !1, ->71
         67    >   FETCH_DIM_R                                      ~31     !0, 'code'
         68        STRLEN                                           ~32     ~31
         69        IS_SMALLER                                       ~33     1, ~32
         70        BOOL                                             ~30     ~33
         71    > > JMPZ_EX                                          ~30     ~30, ->82
         72    >   FETCH_DIM_R                                      ~34     !0, 'code'
         73        STRLEN                                           ~35     ~34
         74        IS_EQUAL                                         ~36     ~35, 2
         75      > JMPZ_EX                                          ~36     ~36, ->80
         76    >   FETCH_DIM_R                                      ~37     !0, 'code'
         77        FETCH_DIM_R                                      ~38     ~37, 1
         78        IS_EQUAL                                         ~39     ~38, '%5C'
         79        BOOL                                             ~36     ~39
         80    >   BOOL_NOT                                         ~40     ~36
         81        BOOL                                             ~30     ~40
         82    > > JMPZ                                                     ~30, ->89
   33    83    >   FETCH_DIM_R                                      ~41     !0, 'code'
         84        CONCAT                                           ~42     '%28%3F%3A', ~41
         85        CONCAT                                           ~43     ~42, '%29'
         86        FREE                                                     ~3
         87      > RETURN                                                   ~43
         88*       JMP                                                      ->92
   35    89    >   FETCH_DIM_R                                      ~44     !0, 'code'
         90        FREE                                                     ~3
         91      > RETURN                                                   ~44
   37    92*       JMP                                                      ->106
   39    93    >   FREE                                                     ~3
         94      > RETURN                                                   '.'
   40    95*       JMP                                                      ->106
   42    96    >   FREE                                                     ~3
         97      > RETURN                                                   '%24'
   43    98*       JMP                                                      ->106
   45    99    >   FREE                                                     ~3
        100      > RETURN                                                   '%5E'
   46   101*       JMP                                                      ->106
   48   102    >   FETCH_DIM_R                                      ~45     !0, 'code'
        103        FREE                                                     ~3
        104      > RETURN                                                   ~45
   49   105*       JMP                                                      ->106
        106    >   FREE                                                     ~3
   51   107      > RETURN                                                   null

End of function compile

End of class RegCodeFn.

Class RegCode:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V1tli
function name:  __construct
number of ops:  18
compiled vars:  !0 = $flags
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   61     0  E >   RECV_INIT                                        !0      ''
   62     1        TYPE_CHECK                                   64          !0
          2      > JMPZ                                                     ~1, ->10
   63     3    > > JMPZ                                                     !0, ->6
          4    >   QM_ASSIGN                                        ~3      !0
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      ''
          7    >   ASSIGN_OBJ                                               'flags'
          8        OP_DATA                                                  ~3
          9      > JMP                                                      ->17
   65    10    >   FETCH_OBJ_R                                      ~5      !0, 'flags'
         11        ASSIGN_OBJ                                               'flags'
         12        OP_DATA                                                  ~5
   66    13        FETCH_OBJ_R                                      ~7      !0, 'chain'
         14        CLONE                                            ~8      ~7
         15        ASSIGN_OBJ                                               'chain'
         16        OP_DATA                                                  ~8
   68    17    > > RETURN                                                   null

End of function __construct

Function start:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V1tli
function name:  start
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   71     0  E >   FETCH_OBJ_W                                      $0      'chain'
          1        ASSIGN_DIM                                               $0
          2        OP_DATA                                                  <array>
   72     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   73     5*     > RETURN                                                   null

End of function start

Function end:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V1tli
function name:  end
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   76     0  E >   FETCH_OBJ_W                                      $0      'chain'
          1        ASSIGN_DIM                                               $0
          2        OP_DATA                                                  <array>
   77     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   78     5*     > RETURN                                                   null

End of function end

Function range:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/V1tli
function name:  range
number of ops:  16
compiled vars:  !0 = $allowed, !1 = $escape
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   80     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <true>
   81     2      > JMPZ                                                     !1, ->7
          3    >   INIT_STATIC_METHOD_CALL                                  'RegCodeFn', 'escape'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $2      
          6        ASSIGN                                                   !0, $2
   83     7    >   INIT_ARRAY                                       ~6      'range', 'type'
          8        ADD_ARRAY_ELEMENT                                ~6      <false>, 'not'
   85     9        ADD_ARRAY_ELEMENT                                ~6      !0, 'allowed'
   82    10        FETCH_OBJ_W                                      $4      'chain'
         11        ASSIGN_DIM                                               $4
   85    12        OP_DATA                                                  ~6
   87    13        FETCH_THIS                                       ~7      
         14      > RETURN                                                   ~7
   88    15*     > RETURN                                                   null

End of function range

Function notrange:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/V1tli
function name:  notRange
number of ops:  19
compiled vars:  !0 = $allowed, !1 = $escape
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   90     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <true>
   91     2        IS_EQUAL                                                 !1, null
          3      > JMPZ                                                     ~2, ->5
          4    >   ASSIGN                                                   !1, <true>
   92     5    > > JMPZ                                                     !1, ->10
          6    >   INIT_STATIC_METHOD_CALL                                  'RegCodeFn', 'escape'
          7        SEND_VAR                                                 !0
          8        DO_FCALL                                      0  $4      
          9        ASSIGN                                                   !0, $4
   94    10    >   INIT_ARRAY                                       ~8      'range', 'type'
         11        ADD_ARRAY_ELEMENT                                ~8      <true>, 'not'
   96    12        ADD_ARRAY_ELEMENT                                ~8      !0, 'allowed'
   93    13        FETCH_OBJ_W                                      $6      'chain'
         14        ASSIGN_DIM                                               $6
   96    15        OP_DATA                                                  ~8
   98    16        FETCH_THIS                                       ~9      
         17      > RETURN                                                   ~9
   99    18*     > RETURN                                                   null

End of function notrange

Function group:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
Branch analysis from position: 24
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
Branch analysis from position: 18
filename:       /in/V1tli
function name:  group
number of ops:  37
compiled vars:  !0 = $name, !1 = $assertion, !2 = $chain
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  101     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      null
  102     3        IS_EQUAL                                                 !2, null
          4      > JMPZ                                                     ~3, ->12
          5    >   IS_EQUAL                                                 !1, null
          6      > JMPZ                                                     ~4, ->9
          7    >   QM_ASSIGN                                        ~5      !0
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~5      !1
         10    >   QM_ASSIGN                                        ~6      ~5
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~6      !2
         13    >   ASSIGN                                                   !2, ~6
  103    14        TYPE_CHECK                                   64          !1
         15      > JMPZ                                                     ~8, ->18
         16    >   QM_ASSIGN                                        ~9      !1
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~9      <false>
         19    >   ASSIGN                                                   !1, ~9
  104    20        TYPE_CHECK                                   64          !0
         21      > JMPZ                                                     ~11, ->24
         22    >   QM_ASSIGN                                  

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
248.75 ms | 1431 KiB | 17 Q