3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Punycode { private function decodeUtf8Character($input, $i, &$codePoint = null) { $input = array_values(unpack('C*', substr($input, $i, 4))); $count = count($input); if ($count >= 2 && ($input[0] & 0xE0) === 0xC0 && ($input[1] & 0xC0) === 0x80) { $codePoint = (($input[0] & 0x1F) << 6) | ($input[1] & 0x3F); return 2; } else if ($count >= 3 && ($input[0] & 0xF0) === 0xE0 && ($input[1] & 0xC0) === 0x80 && ($input[2] & 0xC0) === 0x80) { $codePoint = (($input[0] & 0x0F) << 12) | (($input[1] & 0x3F) << 6) | ($input[2] & 0x3F); return 3; } else if ($count >= 4 && ($input[0] & 0xF8) === 0xF0 && ($input[1] & 0xC0) === 0x80 && ($input[2] & 0xC0) === 0x80 && ($input[3] & 0xC0) === 0x80) { $codePoint = (($input[0] & 0x07) << 18) | (($input[1] & 0x3F) << 12) | (($input[2] & 0x3F) << 6) | ($input[3] & 0x3F); return 4; } return 0; } private function encodeUtf8CodePoint($codePoint) { switch (true) { case $codePoint < 0x80: return pack('C*', $codePoint & 0x7F); case $codePoint < 0x0800: return pack('C*', (($codePoint & 0x07C0) >> 6) | 0xC0, ($codePoint & 0x3F) | 0x80); case $ord < 0x010000: return pack('C*', (($codePoint & 0xF000) >> 12) | 0xE0, (($codePoint & 0x0FC0) >> 6) | 0x80, ($codePoint & 0x3F) | 0x80); case $ord < 0x110000: return pack('C*', (($codePoint & 0x1C0000) >> 18) | 0xF0, (($codePoint & 0x03F000) >> 12) | 0x80, (($codePoint & 0x0FC0) >> 6) | 0x80, ($codePoint & 0x3F) | 0x80); } return false; } private function isDnsLabelChar($charCode) { return ($charCode >= 0x61 && $charCode <= 0x7A) // lower-case letter || ($charCode >= 0x30 && $charCode <= 0x39) // digit || $charCode === 0x2D // - || ($charCode >= 0x41 && $charCode <= 0x5A); // upper-case letter; } private function isPrintableLatin1Char($charCode) { return $charCode >= 0xA0; } private function getEncodingParts($input, &$output = [], &$nonBasicChars = []) { $isUtf8 = true; for ($i = $p = 0, $l = strlen($input); $i < $l; $p++) { $charCode = ord($input[$i]); if ($charCode & 0x80) { if ($isUtf8) { if ($len = $this->decodeUtf8Character($input, $i, $codePoint)) { $nonBasicChars[] = [$p, $codePoint, substr($input, $i, $len), $len]; // undecoded data is stored for UTF-8 chars to facilitate conversion to latin1 if necessary $i += $len; } else { // not a valid UTF-8 code point, convert $nonBasicChars to latin1 representation if (!$this->isPrintableLatin1Char($charCode)) { return false; } $isUtf8 = false; if (!empty($nonBasicChars)) { $offset = 0; for ($j = 0, $l = count($nonBasicChars); $j < $l; $j++) { $base = $nonBasicChars[$j][0]; $nonBasicChars[$j][0] += $offset; $nonBasicChars[$j][1] = ord($nonBasicChars[$j][2][0]); for ($k = 1; $k < $nonBasicChars[$j][3]; $k++) { $nonBasicChars[] = [$base + ++$offset, ord($nonBasicChars[$j][2][$k])]; } } $nonBasicChars[] = [$i++, $charCode]; usort($nonBasicChars, function($a, $b) { return $a[0] - $b[0]; }); } else { $nonBasicChars[] = [$i++, $charCode]; } } } else if ($this->isPrintableLatin1Char($charCode)) { $nonBasicChars[] = [$i++, $charCode]; } else { return false; } } else if ($this->isDnsLabelChar($charCode)) { $output[] = $input[$i++]; } else { return false; } } return true; } private function decodeDigit($digit) { if ($digit >= 0x61 && $digit <= 0x7A) { return $digit - 0x61; } else if ($digit >= 0x30 && $digit <= 0x39) { return $digit - 22; } return false; } private function encodeLabel($input) { if (!$this->getEncodingParts($input, $output, $nonBasicChars)) { return false; } if (empty($nonBasicChars)) { return $input; } } private function adaptBias($delta, $numPoints, $first) { $delta = $first ? $delta / 700 : $delta / 2; $delta += $delta / $numPoints; for ($k = 0; $delta > 455; $k += 36) { $delta = intval($delta / 35); } return $k + (36 * $delta) / ($delta + 38); } private function decodeLabel($input) { if (substr($input, 0, 4) !== 'xn--') { return $input; } $input = substr($input, 4); if (false !== $nonBasicCharsStart = strrpos($input, '-')) { $nonBasicChars = substr($input, $nonBasicCharsStart + 1); $output = str_split(substr($input, 0, $nonBasicCharsStart), 1); } else { $nonBasicChars = $input; $output = []; } $n = 128; $i = 0; $bias = 72; for ($j = 0, $l = strlen($nonBasicChars); $j < $l; $j++) { $oldi = $i; $w = 1; $k = 36; do { if (false === $digit = $this->decodeDigit(ord($nonBasicChars[$j++]))) { return false; } if ($k <= $bias) { $t = 1; } else if ($k >= $bias + 26) { $t = 26; } else { $t = $k - $bias; } $i += $digit * $w; $w *= 36 - $t; $k += 36; } while($digit >= $t); $c = count($output) + 1; $bias = $this->adaptBias($i - $oldi, count($output) + 1, $oldi === 0); $n += (int) ($i / $c); $i %= $c; array_splice($output, $i, 0, $this->encodeUtf8CodePoint($n)); $i++; } return implode('', $output); } public function decode($input) { $output = []; foreach (explode('.', strtolower($input)) as $label) { if (false === $label = $this->decodeLabel($label)) { return false; } $output[] = $label; } return implode('.', $output); } public function encode($input) { $output = []; foreach (explode('.', strtolower($input)) as $label) { if (false === $label = $this->encodeLabel($label)) { return false; } $output[] = $label; } return implode('.', $output); } } echo (new Punycode)->decode("xn--tst-qla.de");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/575vQ
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  235     0  E >   NEW                                              $0      'Punycode'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'decode'
          3        SEND_VAL_EX                                              'xn--tst-qla.de'
          4        DO_FCALL                                      0  $2      
          5        ECHO                                                     $2
          6      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F575vQ%3A91%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/575vQ
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   91     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   92     2        FETCH_DIM_R                                      ~2      !0, 0
          3        FETCH_DIM_R                                      ~3      !1, 0
          4        SUB                                              ~4      ~2, ~3
          5      > RETURN                                                   ~4
   93     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F575vQ%3A91%240

Class Punycode:
Function decodeutf8character:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
2 jumps found. (Code = 46) Position 1 = 25, Position 2 = 29
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 39
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
2 jumps found. (Code = 46) Position 1 = 41, Position 2 = 45
Branch analysis from position: 41
2 jumps found. (Code = 46) Position 1 = 46, Position 2 = 50
Branch analysis from position: 46
2 jumps found. (Code = 46) Position 1 = 51, Position 2 = 55
Branch analysis from position: 51
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 69
Branch analysis from position: 56
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 69
2 jumps found. (Code = 46) Position 1 = 71, Position 2 = 75
Branch analysis from position: 71
2 jumps found. (Code = 46) Position 1 = 76, Position 2 = 80
Branch analysis from position: 76
2 jumps found. (Code = 46) Position 1 = 81, Position 2 = 85
Branch analysis from position: 81
2 jumps found. (Code = 46) Position 1 = 86, Position 2 = 90
Branch analysis from position: 86
2 jumps found. (Code = 43) Position 1 = 91, Position 2 = 107
Branch analysis from position: 91
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 107
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 90
Branch analysis from position: 85
Branch analysis from position: 80
Branch analysis from position: 75
Branch analysis from position: 55
Branch analysis from position: 50
Branch analysis from position: 45
Branch analysis from position: 29
Branch analysis from position: 24
filename:       /in/575vQ
function name:  decodeUtf8Character
number of ops:  109
compiled vars:  !0 = $input, !1 = $i, !2 = $codePoint, !3 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      null
    7     3        INIT_FCALL                                               'array_values'
          4        INIT_FCALL                                               'unpack'
          5        SEND_VAL                                                 'C%2A'
          6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 4
         10        DO_ICALL                                         $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                         $6      
         15        ASSIGN                                                   !0, $6
    8    16        COUNT                                            ~8      !0
         17        ASSIGN                                                   !3, ~8
   10    18        IS_SMALLER_OR_EQUAL                              ~10     2, !3
         19      > JMPZ_EX                                          ~10     ~10, ->24
         20    >   FETCH_DIM_R                                      ~11     !0, 0
         21        BW_AND                                           ~12     ~11, 224
         22        IS_IDENTICAL                                     ~13     ~12, 192
         23        BOOL                                             ~10     ~13
         24    > > JMPZ_EX                                          ~10     ~10, ->29
         25    >   FETCH_DIM_R                                      ~14     !0, 1
         26        BW_AND                                           ~15     ~14, 192
         27        IS_IDENTICAL                                     ~16     ~15, 128
         28        BOOL                                             ~10     ~16
         29    > > JMPZ                                                     ~10, ->39
   11    30    >   FETCH_DIM_R                                      ~17     !0, 0
         31        BW_AND                                           ~18     ~17, 31
         32        SL                                               ~19     ~18, 6
         33        FETCH_DIM_R                                      ~20     !0, 1
         34        BW_AND                                           ~21     ~20, 63
         35        BW_OR                                            ~22     ~19, ~21
         36        ASSIGN                                                   !2, ~22
   12    37      > RETURN                                                   2
         38*       JMP                                                      ->107
   13    39    >   IS_SMALLER_OR_EQUAL                              ~24     3, !3
         40      > JMPZ_EX                                          ~24     ~24, ->45
         41    >   FETCH_DIM_R                                      ~25     !0, 0
         42        BW_AND                                           ~26     ~25, 240
         43        IS_IDENTICAL                                     ~27     ~26, 224
         44        BOOL                                             ~24     ~27
         45    > > JMPZ_EX                                          ~24     ~24, ->50
         46    >   FETCH_DIM_R                                      ~28     !0, 1
         47        BW_AND                                           ~29     ~28, 192
         48        IS_IDENTICAL                                     ~30     ~29, 128
         49        BOOL                                             ~24     ~30
         50    > > JMPZ_EX                                          ~24     ~24, ->55
         51    >   FETCH_DIM_R                                      ~31     !0, 2
         52        BW_AND                                           ~32     ~31, 192
         53        IS_IDENTICAL                                     ~33     ~32, 128
         54        BOOL                                             ~24     ~33
         55    > > JMPZ                                                     ~24, ->69
   14    56    >   FETCH_DIM_R                                      ~34     !0, 0
         57        BW_AND                                           ~35     ~34, 15
         58        SL                                               ~36     ~35, 12
         59        FETCH_DIM_R                                      ~37     !0, 1
         60        BW_AND                                           ~38     ~37, 63
         61        SL                                               ~39     ~38, 6
         62        BW_OR                                            ~40     ~36, ~39
         63        FETCH_DIM_R                                      ~41     !0, 2
         64        BW_AND                                           ~42     ~41, 63
         65        BW_OR                                            ~43     ~40, ~42
         66        ASSIGN                                                   !2, ~43
   15    67      > RETURN                                                   3
         68*       JMP                                                      ->107
   16    69    >   IS_SMALLER_OR_EQUAL                              ~45     4, !3
         70      > JMPZ_EX                                          ~45     ~45, ->75
         71    >   FETCH_DIM_R                                      ~46     !0, 0
         72        BW_AND                                           ~47     ~46, 248
         73        IS_IDENTICAL                                     ~48     ~47, 240
         74        BOOL                                             ~45     ~48
         75    > > JMPZ_EX                                          ~45     ~45, ->80
         76    >   FETCH_DIM_R                                      ~49     !0, 1
         77        BW_AND                                           ~50     ~49, 192
         78        IS_IDENTICAL                                     ~51     ~50, 128
         79        BOOL                                             ~45     ~51
         80    > > JMPZ_EX                                          ~45     ~45, ->85
         81    >   FETCH_DIM_R                                      ~52     !0, 2
         82        BW_AND                                           ~53     ~52, 192
         83        IS_IDENTICAL                                     ~54     ~53, 128
         84        BOOL                                             ~45     ~54
         85    > > JMPZ_EX                                          ~45     ~45, ->90
         86    >   FETCH_DIM_R                                      ~55     !0, 3
         87        BW_AND                                           ~56     ~55, 192
         88        IS_IDENTICAL                                     ~57     ~56, 128
         89        BOOL                                             ~45     ~57
         90    > > JMPZ                                                     ~45, ->107
   17    91    >   FETCH_DIM_R                                      ~58     !0, 0
         92        BW_AND                                           ~59     ~58, 7
         93        SL                                               ~60     ~59, 18
         94        FETCH_DIM_R                                      ~61     !0, 1
         95        BW_AND                                           ~62     ~61, 63
         96        SL                                               ~63     ~62, 12
         97        BW_OR                                            ~64     ~60, ~63
         98        FETCH_DIM_R                                      ~65     !0, 2
         99        BW_AND                                           ~66     ~65, 63
        100        SL                                               ~67     ~66, 6
        101        BW_OR                                            ~68     ~64, ~67
        102        FETCH_DIM_R                                      ~69     !0, 3
        103        BW_AND                                           ~70     ~69, 63
        104        BW_OR                                            ~71     ~68, ~70
        105        ASSIGN                                                   !2, ~71
   18   106      > RETURN                                                   4
   21   107    > > RETURN                                                   0
   22   108*     > RETURN                                                   null

End of function decodeutf8character

Function encodeutf8codepoint:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 27
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 42
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 61
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/575vQ
function name:  encodeUtf8CodePoint
number of ops:  63
compiled vars:  !0 = $codePoint, !1 = $ord
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   27     1        IS_SMALLER                                               !0, 128
          2      > JMPNZ                                                    ~3, ->10
   30     3    >   IS_SMALLER                                               !0, 2048
          4      > JMPNZ                                                    ~4, ->16
   33     5    >   IS_SMALLER                                               !1, 65536
          6      > JMPNZ                                                    ~5, ->27
   36     7    >   IS_SMALLER                                               !1, 1114112
          8      > JMPNZ                                                    ~6, ->42
          9    > > JMP                                                      ->61
   28    10    >   INIT_FCALL                                               'pack'
         11        SEND_VAL                                                 'C%2A'
         12        BW_AND                                           ~7      !0, 127
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                         $8      
         15      > RETURN                                                   $8
   31    16    >   INIT_FCALL                                               'pack'
         17        SEND_VAL                                                 'C%2A'
         18        BW_AND                                           ~9      !0, 1984
         19        SR                                               ~10     ~9, 6
         20        BW_OR                                            ~11     ~10, 192
         21        SEND_VAL                                                 ~11
         22        BW_AND                                           ~12     !0, 63
         23        BW_OR                                            ~13     ~12, 128
         24        SEND_VAL                                                 ~13
         25        DO_ICALL                                         $14     
         26      > RETURN                                                   $14
   34    27    >   INIT_FCALL                                               'pack'
         28        SEND_VAL                                                 'C%2A'
         29        BW_AND                                           ~15     !0, 61440
         30        SR                                               ~16     ~15, 12
         31        BW_OR                                            ~17     ~16, 224
         32        SEND_VAL                                                 ~17
         33        BW_AND                                           ~18     !0, 4032
         34        SR                                               ~19     ~18, 6
         35        BW_OR                                            ~20     ~19, 128
         36        SEND_VAL                                                 ~20
         37        BW_AND                                           ~21     !0, 63
         38        BW_OR                                            ~22     ~21, 128
         39        SEND_VAL                                                 ~22
         40        DO_ICALL                                         $23     
         41      > RETURN                                                   $23
   37    42    >   INIT_FCALL                                               'pack'
         43        SEND_VAL                                                 'C%2A'
         44        BW_AND                                           ~24     !0, 1835008
         45        SR                                               ~25     ~24, 18
         46        BW_OR                                            ~26     ~25, 240
         47        SEND_VAL                                                 ~26
         48        BW_AND                                           ~27     !0, 258048
         49        SR                                               ~28     ~27, 12
         50        BW_OR                                            ~29     ~28, 128
         51        SEND_VAL                                                 ~29
         52        BW_AND                                           ~30     !0, 4032
         53        SR                                               ~31     ~30, 6
         54        BW_OR                                            ~32     ~31, 128
         55        SEND_VAL                                                 ~32
         56        BW_AND                                           ~33     !0, 63
         57        BW_OR                                            ~34     ~33, 128
         58        SEND_VAL                                                 ~34
         59        DO_ICALL                                         $35     
         60      > RETURN                                                   $35
   40    61    > > RETURN                                                   <false>
   41    62*     > RETURN                                                   null

End of function encodeutf8codepoint

Function isdnslabelchar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 47) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
2 jumps found. (Code = 47) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
2 jumps found. (Code = 46) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 20
Branch analysis from position: 14
Branch analysis from position: 10
Branch analysis from position: 11
Branch analysis from position: 5
filename:       /in/575vQ
function name:  isDnsLabelChar
number of ops:  22
compiled vars:  !0 = $charCode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   43     0  E >   RECV                                             !0      
   45     1        IS_SMALLER_OR_EQUAL                              ~1      97, !0
          2      > JMPZ_EX                                          ~1      ~1, ->5
          3    >   IS_SMALLER_OR_EQUAL                              ~2      !0, 122
          4        BOOL                                             ~1      ~2
          5    > > JMPNZ_EX                                         ~1      ~1, ->11
   46     6    >   IS_SMALLER_OR_EQUAL                              ~3      48, !0
          7      > JMPZ_EX                                          ~3      ~3, ->10
          8    >   IS_SMALLER_OR_EQUAL                              ~4      !0, 57
          9        BOOL                                             ~3      ~4
         10    >   BOOL                                             ~1      ~3
         11    > > JMPNZ_EX                                         ~1      ~1, ->14
   47    12    >   IS_IDENTICAL                                     ~5      !0, 45
         13        BOOL                                             ~1      ~5
         14    > > JMPNZ_EX                                         ~1      ~1, ->20
   48    15    >   IS_SMALLER_OR_EQUAL                              ~6      65, !0
         16      > JMPZ_EX                                          ~6      ~6, ->19
         17    >   IS_SMALLER_OR_EQUAL                              ~7      !0, 90
         18        BOOL                                             ~6      ~7
         19    >   BOOL                                             ~1      ~6
         20    > > RETURN                                                   ~1
   49    21*     > RETURN                                                   null

End of function isdnslabelchar

Function isprintablelatin1char:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/575vQ
function name:  isPrintableLatin1Char
number of ops:  4
compiled vars:  !0 = $charCode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   51     0  E >   RECV                                             !0      
   53     1        IS_SMALLER_OR_EQUAL                              ~1      160, !0
          2      > RETURN                                                   ~1
   54     3*     > RETURN                                                   null

End of function isprintablelatin1char

Function getencodingparts:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 129
Branch analysis from position: 129
2 jumps found. (Code = 44) Position 1 = 131, Position 2 = 9
Branch analysis from position: 131
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 118
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 106
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 37
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 105
Branch analysis from position: 105
1 jumps found. (Code = 42) Position 1 = 117
Branch analysis from position: 117
1 jumps found. (Code = 42) Position 1 = 128
Branch analysis from position: 128
2 jumps found. (Code = 44) Position 1 = 131, Position 2 = 9
Branch analysis from position: 131
Branch analysis from position: 9
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 43
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 100
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 87
Branch analysis from position: 87
2 jumps found. (Code = 44) Position 1 = 89, Position 2 = 52
Branch analysis from position: 89
1 jumps found. (Code = 42) Position 1 = 105
Branch analysis from position: 105
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 82
Branch analysis from position: 82
2 jumps found. (Code = 44) Position 1 = 86, Position 2 = 69
Branch analysis from position: 86
2 jumps found. (Code = 44) Position 1 = 89, Position 2 = 52
Branch analysis from position: 89
Branch analysis from position: 52
Branch analysis from position: 69
2 jumps found. (Code = 44) Position 1 = 86, Position 2 = 69
Branch analysis from position: 86
Branch analysis from position: 69
Branch analysis from position: 100
1 jumps found. (Code = 42) Position 1 = 117
Branch analysis from position: 117
Branch analysis from position: 106
2 jumps found. (Code = 43) Position 1 = 110, Position 2 = 116
Branch analysis from position: 110
1 jumps found. (Code = 42) Position 1 = 117
Branch analysis from position: 117
Branch analysis from position: 116
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 118
2 jumps found. (Code = 43) Position 1 = 122, Position 2 = 127
Branch analysis from position: 122
1 jumps found. (Code = 42) Position 1 = 128
Branch analysis from position: 128
Branch analysis from position: 127
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/575vQ
function name:  getEncodingParts
number of ops:  133
compiled vars:  !0 = $input, !1 = $output, !2 = $nonBasicChars, !3 = $isUtf8, !4 = $i, !5 = $p, !6 = $l, !7 = $charCode, !8 = $len, !9 = $codePoint, !10 = $offset, !11 = $j, !12 = $base, !13 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   56     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
          2        RECV_INIT                                        !2      <array>
   58     3        ASSIGN                                                   !3, <true>
   60     4        ASSIGN                                           ~15     !5, 0
          5        ASSIGN                                                   !4, ~15
          6        STRLEN                                           ~17     !0
          7        ASSIGN                                                   !6, ~17
          8      > JMP                                                      ->129
   61     9    >   INIT_FCALL                                               'ord'
         10        FETCH_DIM_R                                      ~19     !0, !4
         11        SEND_VAL                                                 ~19
         12        DO_ICALL                                         $20     
         13        ASSIGN                                                   !7, $20
   63    14        BW_AND                                           ~22     !7, 128
         15      > JMPZ                                                     ~22, ->118
   64    16    > > JMPZ                                                     !3, ->106
   65    17    >   INIT_METHOD_CALL                                         'decodeUtf8Character'
         18        SEND_VAR                                                 !0
         19        SEND_VAR                                                 !4
         20        SEND_REF                                                 !9
         21        DO_FCALL                                      0  $23     
         22        ASSIGN                                           ~24     !8, $23
         23      > JMPZ                                                     ~24, ->37
   66    24    >   INIT_ARRAY                                       ~26     !5
         25        ADD_ARRAY_ELEMENT                                ~26     !9
         26        INIT_FCALL                                               'substr'
         27        SEND_VAR                                                 !0
         28        SEND_VAR                                                 !4
         29        SEND_VAR                                                 !8
         30        DO_ICALL                                         $27     
         31        ADD_ARRAY_ELEMENT                                ~26     $27
         32        ADD_ARRAY_ELEMENT                                ~26     !8
         33        ASSIGN_DIM                                               !2
         34        OP_DATA                                                  ~26
   67    35        ASSIGN_OP                                     1          !4, !8
         36      > JMP                                                      ->105
   70    37    >   INIT_METHOD_CALL                                         'isPrintableLatin1Char'
         38        SEND_VAR                                                 !7
         39        DO_FCALL                                      0  $29     
         40        BOOL_NOT                                         ~30     $29
         41      > JMPZ                                                     ~30, ->43
   71    42    > > RETURN                                                   <false>
   74    43    >   ASSIGN                                                   !3, <false>
   76    44        ISSET_ISEMPTY_CV                                 ~32     !2
         45        BOOL_NOT                                         ~33     ~32
         46      > JMPZ                                                     ~33, ->100
   77    47    >   ASSIGN                                                   !10, 0
   79    48        ASSIGN                                                   !11, 0
         49        COUNT                                            ~36     !2
         50        ASSIGN                                                   !6, ~36
         51      > JMP                                                      ->87
   80    52    >   FETCH_DIM_R                                      ~38     !2, !11
         53        FETCH_DIM_R                                      ~39     ~38, 0
         54        ASSIGN                                                   !12, ~39
   81    55        FETCH_DIM_RW                                     $41     !2, !11
         56        ASSIGN_DIM_OP                +=               1          $41, 0
         57        OP_DATA                                                  !10
   82    58        INIT_FCALL                                               'ord'
         59        FETCH_DIM_R                                      ~45     !2, !11
         60        FETCH_DIM_R                                      ~46     ~45, 2
         61        FETCH_DIM_R                                      ~47     ~46, 0
         62        SEND_VAL                                                 ~47
         63        DO_ICALL                                         $48     
         64        FETCH_DIM_W                                      $43     !2, !11
         65        ASSIGN_DIM                                               $43, 1
         66        OP_DATA                                                  $48
   84    67        ASSIGN                                                   !13, 1
         68      > JMP                                                      ->82
   85    69    >   PRE_INC                                          ~51     !10
         70        ADD                                              ~52     !12, ~51
         71        INIT_ARRAY                                       ~53     ~52
         72        INIT_FCALL                                               'ord'
         73        FETCH_DIM_R                                      ~54     !2, !11
         74        FETCH_DIM_R                                      ~55     ~54, 2
         75        FETCH_DIM_R                                      ~56     ~55, !13
         76        SE

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.85 ms | 1428 KiB | 23 Q