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['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?:""; }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?:0) . ($max===false?',' . ($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($force){ 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();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oHJUK
function name:  (null)
number of ops:  19
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        ECHO                                                     $5
         18      > RETURN                                                   1

Function rc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oHJUK
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/oHJUK
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/oHJUK
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 = 63, Position 4 = 63, Position 5 = 90, Position 6 = 93, Position 7 = 96, Position 8 = 99, Position 9 = 103, 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 = 44, Position 2 = 55
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 48
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 63
2 jumps found. (Code = 46) Position 1 = 64, Position 2 = 68
Branch analysis from position: 64
2 jumps found. (Code = 46) Position 1 = 69, Position 2 = 79
Branch analysis from position: 69
2 jumps found. (Code = 46) Position 1 = 73, Position 2 = 77
Branch analysis from position: 73
2 jumps found. (Code = 43) Position 1 = 80, Position 2 = 86
Branch analysis from position: 80
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 86
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 77
Branch analysis from position: 79
Branch analysis from position: 68
Branch analysis from position: 63
Branch analysis from position: 90
1 jumps found. (Code = 62) Position 1 = -2
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: 103
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 = 63
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 63
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 90
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 93
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 96
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 99
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 103
Branch analysis from position: 103
Branch analysis from position: 99
Branch analysis from position: 96
Branch analysis from position: 93
Branch analysis from position: 90
Branch analysis from position: 63
Branch analysis from position: 63
Branch analysis from position: 33
Branch analysis from position: 21
filename:       /in/oHJUK
function name:  compile
number of ops:  105
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':->63, 'text':->63, 'any':->90, 'end':->93, 'start':->96, 'repeat':->99, ], ->103
   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, ->63
   31    10    >   CASE                                                     ~3, 'text'
         11      > JMPNZ                                                    ~4, ->63
   38    12    >   CASE                                                     ~3, 'any'
         13      > JMPNZ                                                    ~4, ->90
   41    14    >   CASE                                                     ~3, 'end'
         15      > JMPNZ                                                    ~4, ->93
   44    16    >   CASE                                                     ~3, 'start'
         17      > JMPNZ                                                    ~4, ->96
   47    18    >   CASE                                                     ~3, 'repeat'
         19      > JMPNZ                                                    ~4, ->99
         20    > > JMP                                                      ->103
   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                                                      ->103
   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        JMP_SET                                          ~15     ~14, ->41
         40        QM_ASSIGN                                        ~15     ''
         41        CONCAT                                           ~16     '%28', ~15
         42        FETCH_DIM_R                                      ~17     !0, 'name'
         43      > JMPZ                                                     ~17, ->55
         44    >   FETCH_DIM_R                                      ~18     !0, 'assertion'
         45      > JMPZ                                                     ~18, ->48
         46    >   QM_ASSIGN                                        ~19     ''
         47      > JMP                                                      ->49
         48    >   QM_ASSIGN                                        ~19     '%3F'
         49    >   CONCAT                                           ~20     ~19, 'P%3C'
         50        FETCH_DIM_R                                      ~21     !0, 'name'
         51        CONCAT                                           ~22     ~20, ~21
         52        CONCAT                                           ~23     ~22, '%3E'
         53        QM_ASSIGN                                        ~24     ~23
         54      > JMP                                                      ->56
         55    >   QM_ASSIGN                                        ~24     ''
         56    >   CONCAT                                           ~25     ~16, ~24
         57        FETCH_DIM_R                                      ~26     !2, 'code'
         58        CONCAT                                           ~27     ~25, ~26
         59        CONCAT                                           ~28     ~27, '%29'
         60        FREE                                                     ~3
         61      > RETURN                                                   ~28
   29    62*       JMP                                                      ->103
   32    63    > > JMPZ_EX                                          ~29     !1, ->68
         64    >   FETCH_DIM_R                                      ~30     !0, 'code'
         65        STRLEN                                           ~31     ~30
         66        IS_SMALLER                                       ~32     1, ~31
         67        BOOL                                             ~29     ~32
         68    > > JMPZ_EX                                          ~29     ~29, ->79
         69    >   FETCH_DIM_R                                      ~33     !0, 'code'
         70        STRLEN                                           ~34     ~33
         71        IS_EQUAL                                         ~35     ~34, 2
         72      > JMPZ_EX                                          ~35     ~35, ->77
         73    >   FETCH_DIM_R                                      ~36     !0, 'code'
         74        FETCH_DIM_R                                      ~37     ~36, 1
         75        IS_EQUAL                                         ~38     ~37, '%5C'
         76        BOOL                                             ~35     ~38
         77    >   BOOL_NOT                                         ~39     ~35
         78        BOOL                                             ~29     ~39
         79    > > JMPZ                                                     ~29, ->86
   33    80    >   FETCH_DIM_R                                      ~40     !0, 'code'
         81        CONCAT                                           ~41     '%28%3F%3A', ~40
         82        CONCAT                                           ~42     ~41, '%29'
         83        FREE                                                     ~3
         84      > RETURN                                                   ~42
         85*       JMP                                                      ->89
   35    86    >   FETCH_DIM_R                                      ~43     !0, 'code'
         87        FREE                                                     ~3
         88      > RETURN                                                   ~43
   37    89*       JMP                                                      ->103
   39    90    >   FREE                                                     ~3
         91      > RETURN                                                   '.'
   40    92*       JMP                                                      ->103
   42    93    >   FREE                                                     ~3
         94      > RETURN                                                   '%24'
   43    95*       JMP                                                      ->103
   45    96    >   FREE                                                     ~3
         97      > RETURN                                                   '%5E'
   46    98*       JMP                                                      ->103
   48    99    >   FETCH_DIM_R                                      ~44     !0, 'code'
        100        FREE                                                     ~3
        101      > RETURN                                                   ~44
   49   102*       JMP                                                      ->103
        103    >   FREE                                                     ~3
   51   104      > 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 = 8
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oHJUK
function name:  __construct
number of ops:  16
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, ->8
   63     3    >   JMP_SET                                          ~3      !0, ->5
          4        QM_ASSIGN                                        ~3      ''
          5        ASSIGN_OBJ                                               'flags'
          6        OP_DATA                                                  ~3
          7      > JMP                                                      ->15
   65     8    >   FETCH_OBJ_R                                      ~5      !0, 'flags'
          9        ASSIGN_OBJ                                               'flags'
         10        OP_DATA                                                  ~5
   66    11        FETCH_OBJ_R                                      ~7      !0, 'chain'
         12        CLONE                                            ~8      ~7
         13        ASSIGN_OBJ                                               'chain'
         14        OP_DATA                                                  ~8
   68    15    > > 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/oHJUK
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/oHJUK
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/oHJUK
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/oHJUK
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/oHJUK
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                                        ~12     !0
         23      > JMP                                                      ->25
         24    >   QM_ASSIGN                                        ~12     <false>
         25    >   ASSIGN                                                   !0, ~12
  106    26        INIT_ARRAY                                       ~16     'group', 'type'
  107    27        ADD_ARRAY_ELEMENT                                ~16     !1, 'assertion'
  108    28        ADD_ARRAY_ELEMENT                                ~16     !0, 'name'
  109    29        FETCH_OBJ_R                                      ~17     !2, 'chain'
         30        ADD_ARRAY_ELEMENT                                ~16     ~17, 'chain'
  105    31        FETCH_OBJ_W                                      $14     'chain'
         32        ASSIGN_DIM                                               $14
  109    33        OP_DATA                                                  ~16
  111    34        FETCH_THIS                                       ~18     
         35      > RETURN                                                   ~18
  112    36*     > RETURN                                                   null

End of function group

Function any:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oHJUK
function name:  any
number of ops:  6
compiled vars:  none
line      #* E I O op            

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.42 ms | 1431 KiB | 16 Q