3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Password { /** * @var integer desired length of password, default: null */ protected $length; /** * @var array $numbers available numbers (0-9), default: [] */ protected $numbers = []; /** * @var array $uppercase available uppercase characters (A-Z), default: [] */ protected $uppercase = []; /** * @var array available lowercase characters (a-z), default: [] */ protected $lowercase = []; /** * @var array available symbols (! @ # $ % ^ * - _ + = ?), default: [] */ protected $symbols = []; /** * @var array characters to exclude from available characters - supersedes include, default: [] */ protected $exclude = []; /** * @var array characters to include from available characters - overridden by exclude, default: [] */ protected $include = []; /** * @var int amount of times to repeat the specified characters, default: 1 */ protected $repeat = 1; /** * @var array list of characters to exclude when symbols is selected by default */ protected $extended = ['/', '\\', '(', ')', '<', '>', '\'', '"', '[', ']', '{', '}']; /** * @var array default values */ protected $options = [ 'numbers' => true, 'uppercase' => true, 'lowercase' => false, 'symbols' => false, 'extended' => false, 'exclude' => [], 'include' => [], 'repeat' => 1 ]; /** * @var bool generate as html, default: false */ protected $html = false; /** * generates a password of the specified length using desired options * attempts to prevent repeat characters unless repeat is greater than 1 or the specified length is greater than available characters * automatically adjusts repeat based on desired length and desired characters to ensure desired length is reached * @param integer $length desired length of password * @param bool $numbers include numbers (0-9) in available characters, default: true * @param bool $uppercase include uppercase characters (A-Z) in available characters, default: true * @param bool $lowercase include lowercase characters (a-z) in available characters, default: false * @param bool $symbols include symbols (! @ # $ % ^ * - _ + = ?) in available characters, default: false * @param bool $extended include obscure symbols (, ), <, >, /, \, ", ', in available characters default: false * @param array $exclude characters to exclude from available characters - supersedes include, default: array() * @param array $include characters to include from available characters - overridden by exclude, default: array() * @param integer $repeat how many times to repeat the specified characters, default: 1 * @return \ISEL\Auth\Password */ public function __construct($length, $numbers = null, $uppercase = null, $lowercase = null, $symbols = null, $extended = null, array $exclude = null, array $include = null, $repeat = null) { $this->setLength($length); $this->setOptions([ 'numbers' => $numbers, 'uppercase' => $uppercase, 'lowercase' => $lowercase, 'symbols' => $symbols, 'extended' => $extended, 'exclude' => $exclude, 'include' => $include, 'repeat' => $repeat ]); } /** * generates a password of the specified length using desired options * attempts to prevent repeat characters unless repeat is greater than 1 or the specified length is greater than available characters * automatically adjusts repeat based on desired length and desired characters to ensure desired length is reached * @param integer $length desired length of password * @param bool $numbers include numbers (0-9) in available characters, default: true * @param bool $uppercase include uppercase characters (A-Z) in available characters, default: true * @param bool $lowercase include lowercase characters (a-z) in available characters, default: false * @param bool $symbols include symbols (! @ # $ % ^ * - _ + = ?) in available characters, default: false * @param bool $extended include obscure symbols (, ), <, >, /, \, ", ', in available characters default: false * @param array $exclude characters to exclude from available characters - supersedes include, default: array() * @param array $include characters to include from available characters - overridden by exclude, default: array() * @param integer $repeat how many times to repeat the specified characters, default: 1 * @return string */ public static function factory($length, $numbers = null, $uppercase = null, $lowercase = null, $symbols = null, $extended = null, array $exclude = null, array $include = null, $repeat = null) { return new self($length, $numbers, $uppercase, $lowercase, $symbols, $extended, $exclude, $include, $repeat); } /** * @param array $options set options using an array of values, and use defaults */ public function setOptions(array $options) { foreach ($this->options as $option => $default) { $method = 'set' . ucfirst($option); $value = (true === isset($options[$option]) && null !== $options[$option] ? $options[$option] : $default); $this->$method($value); } } /** * convert password string to html friendly string * @param $password * @return string */ public static function passwordToHtml($password) { return htmlentities($password, ENT_HTML5 | ENT_QUOTES, false); } /** * convert html entity string to literal string * @param $password * @return string */ public static function passwordFromHtml($password) { return html_entity_decode($password, ENT_HTML5 | ENT_QUOTES); } /** * convert password string to html friendly string * @param null $password * @return string */ public function toHtml($password = null) { return self::passwordToHtml($password ? : $this->generate()); } /** * takes an html entity string and converts it to literal characters * @param $password * @return string */ public function fromHtml($password) { return self::passwordFromHtml($password); } /** * output the password based on specified settings * automatically adjusts based on supplied characters and desired length * @return string */ public function output() { $characters = $this->getAvailableCharacters(); $string = substr(str_shuffle(str_repeat($characters, (ceil($this->length / strlen($characters)) * $this->repeat))), 0, $this->length); if (true === empty($string)) { throw new \RuntimeException('No string generated, check excluded characters.'); } if (true === $this->html) { $string = self::passwordToHtml($string); } return $string; } /** * @return string */ public function getAvailableCharacters() { return implode('', array_diff(array_merge($this->include, $this->lowercase, $this->uppercase, $this->numbers, $this->symbols), array_merge($this->exclude, $this->extended))); } /** * set Exclude * @param array $exclude * @return $this */ public function setExclude(array $exclude) { $this->exclude = $exclude; return $this; } /** * set Html * @param boolean $html * @return $this */ public function setHtml($html) { $this->html = $html; return $this; } /** * set Include * @param array $include * @return $this */ public function setInclude(array $include) { $this->include = $include; return $this; } /** * set Length * @param int $length * @return $this */ public function setLength($length) { $this->length = (int) $length; return $this; } /** * set Lowercase * @param boolean $lowercase * @return $this */ public function setLowercase($lowercase, $start = 'a', $end = 'z') { $this->lowercase = (true === (bool) $lowercase ? range(strtolower($start), strtolower($end)) : []); return $this; } /** * set Numbers * @param boolean $numbers * @return $this */ public function setNumbers($numbers, $start = 0, $end = 9) { $this->numbers = (true === (bool) $numbers ? range((int) $start, (int) $end) : []); return $this; } /** * set Repeat * @param int $repeat * @return $this */ public function setRepeat($repeat) { $this->repeat = (int) $repeat; return $this; } /** * set Symbols * @param boolean $symbols include symbols * @return $this */ public function setSymbols($symbols) { $this->symbols = (true === (bool) $symbols ? array_merge(range('!', '/'), range(':', '@'), range('[', '`')) : []); return $this; } /** * set Extended * @param bool $extended include extended symbols, default: false * @return $this */ public function setExtended($extended) { $this->extended = (false === (bool) $extended ? ['/', '\\', '(', ')', '<', '>', '\'', '"', '[', ']', '{', '}'] : []); return $this; } /** * set Uppercase * @param boolean $uppercase * @param string $start starting character, default: A * @param string $end ending character, default: Z * @return $this */ public function setUppercase($uppercase, $start = 'A', $end = 'Z') { $this->uppercase = (true === (bool) $uppercase ? range(strtoupper($start), strtoupper($end)) : []); return $this; } /** * @return string */ public function __toString() { return $this->output(); } } $temppasword = Password::factory(20490)->output(); echo $temppasword;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  (null)
number of ops:  9
compiled vars:  !0 = $temppasword
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'password'
  319     1        INIT_STATIC_METHOD_CALL                                  'Password', 'factory'
          2        SEND_VAL_EX                                              20490
          3        DO_FCALL                                      0  $1      
          4        INIT_METHOD_CALL                                         $1, 'output'
          5        DO_FCALL                                      0  $2      
          6        ASSIGN                                                   !0, $2
  320     7        ECHO                                                     !0
          8      > RETURN                                                   1

Class Password:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  __construct
number of ops:  24
compiled vars:  !0 = $length, !1 = $numbers, !2 = $uppercase, !3 = $lowercase, !4 = $symbols, !5 = $extended, !6 = $exclude, !7 = $include, !8 = $repeat
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   84     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      null
          3        RECV_INIT                                        !3      null
          4        RECV_INIT                                        !4      null
          5        RECV_INIT                                        !5      null
          6        RECV_INIT                                        !6      null
          7        RECV_INIT                                        !7      null
          8        RECV_INIT                                        !8      null
   86     9        INIT_METHOD_CALL                                         'setLength'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
   87    12        INIT_METHOD_CALL                                         'setOptions'
   88    13        INIT_ARRAY                                       ~10     !1, 'numbers'
   89    14        ADD_ARRAY_ELEMENT                                ~10     !2, 'uppercase'
   90    15        ADD_ARRAY_ELEMENT                                ~10     !3, 'lowercase'
   91    16        ADD_ARRAY_ELEMENT                                ~10     !4, 'symbols'
   92    17        ADD_ARRAY_ELEMENT                                ~10     !5, 'extended'
   93    18        ADD_ARRAY_ELEMENT                                ~10     !6, 'exclude'
   94    19        ADD_ARRAY_ELEMENT                                ~10     !7, 'include'
   95    20        ADD_ARRAY_ELEMENT                                ~10     !8, 'repeat'
         21        SEND_VAL_EX                                              ~10
         22        DO_FCALL                                      0          
   97    23      > RETURN                                                   null

End of function __construct

Function factory:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  factory
number of ops:  22
compiled vars:  !0 = $length, !1 = $numbers, !2 = $uppercase, !3 = $lowercase, !4 = $symbols, !5 = $extended, !6 = $exclude, !7 = $include, !8 = $repeat
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  114     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      null
          3        RECV_INIT                                        !3      null
          4        RECV_INIT                                        !4      null
          5        RECV_INIT                                        !5      null
          6        RECV_INIT                                        !6      null
          7        RECV_INIT                                        !7      null
          8        RECV_INIT                                        !8      null
  116     9        NEW                          self                $9      
         10        SEND_VAR_EX                                              !0
         11        SEND_VAR_EX                                              !1
         12        SEND_VAR_EX                                              !2
         13        SEND_VAR_EX                                              !3
         14        SEND_VAR_EX                                              !4
         15        SEND_VAR_EX                                              !5
         16        SEND_VAR_EX                                              !6
         17        SEND_VAR_EX                                              !7
         18        SEND_VAR_EX                                              !8
         19        DO_FCALL                                      0          
         20      > RETURN                                                   $9
  117    21*     > RETURN                                                   null

End of function factory

Function setoptions:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 26
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 26
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/r45f4
function name:  setOptions
number of ops:  28
compiled vars:  !0 = $options, !1 = $default, !2 = $option, !3 = $method, !4 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  122     0  E >   RECV                                             !0      
  124     1        FETCH_OBJ_R                                      ~5      'options'
          2      > FE_RESET_R                                       $6      ~5, ->26
          3    > > FE_FETCH_R                                       ~7      $6, !1, ->26
          4    >   ASSIGN                                                   !2, ~7
  125     5        INIT_FCALL                                               'ucfirst'
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $9      
          8        CONCAT                                           ~10     'set', $9
          9        ASSIGN                                                   !3, ~10
  126    10        ISSET_ISEMPTY_DIM_OBJ                         0  ~12     !0, !2
         11        TYPE_CHECK                                    8  ~13     ~12
         12      > JMPZ_EX                                          ~13     ~13, ->16
         13    >   FETCH_DIM_R                                      ~14     !0, !2
         14        TYPE_CHECK                                  1020  ~15     ~14
         15        BOOL                                             ~13     ~15
         16    > > JMPZ                                                     ~13, ->20
         17    >   FETCH_DIM_R                                      ~16     !0, !2
         18        QM_ASSIGN                                        ~17     ~16
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~17     !1
         21    >   ASSIGN                                                   !4, ~17
  127    22        INIT_METHOD_CALL                                         !3
         23        SEND_VAR_EX                                              !4
         24        DO_FCALL                                      0          
  124    25      > JMP                                                      ->3
         26    >   FE_FREE                                                  $6
  129    27      > RETURN                                                   null

End of function setoptions

Function passwordtohtml:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  passwordToHtml
number of ops:  8
compiled vars:  !0 = $password
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  136     0  E >   RECV                                             !0      
  138     1        INIT_FCALL                                               'htmlentities'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 51
          4        SEND_VAL                                                 <false>
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
  139     7*     > RETURN                                                   null

End of function passwordtohtml

Function passwordfromhtml:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  passwordFromHtml
number of ops:  7
compiled vars:  !0 = $password
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  146     0  E >   RECV                                             !0      
  148     1        INIT_FCALL                                               'html_entity_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 51
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
  149     6*     > RETURN                                                   null

End of function passwordfromhtml

Function tohtml:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  toHtml
number of ops:  10
compiled vars:  !0 = $password
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  156     0  E >   RECV_INIT                                        !0      null
  158     1        INIT_STATIC_METHOD_CALL                                  'passwordToHtml'
          2        JMP_SET                                          ~1      !0, ->6
          3        INIT_METHOD_CALL                                         'generate'
          4        DO_FCALL                                      0  $2      
          5        QM_ASSIGN                                        ~1      $2
          6        SEND_VAL                                                 ~1
          7        DO_FCALL                                      0  $3      
          8      > RETURN                                                   $3
  159     9*     > RETURN                                                   null

End of function tohtml

Function fromhtml:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  fromHtml
number of ops:  6
compiled vars:  !0 = $password
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  166     0  E >   RECV                                             !0      
  168     1        INIT_STATIC_METHOD_CALL                                  'passwordFromHtml'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
  169     5*     > RETURN                                                   null

End of function fromhtml

Function output:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 39
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
filename:       /in/r45f4
function name:  output
number of ops:  41
compiled vars:  !0 = $characters, !1 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  178     0  E >   INIT_METHOD_CALL                                         'getAvailableCharacters'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
  179     3        INIT_FCALL                                               'substr'
          4        INIT_FCALL                                               'str_shuffle'
          5        INIT_FCALL                                               'str_repeat'
          6        SEND_VAR                                                 !0
          7        INIT_FCALL                                               'ceil'
          8        FETCH_OBJ_R                                      ~4      'length'
          9        STRLEN                                           ~5      !0
         10        DIV                                              ~6      ~4, ~5
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                         $7      
         13        FETCH_OBJ_R                                      ~8      'repeat'
         14        MUL                                              ~9      $7, ~8
         15        SEND_VAL                                                 ~9
         16        DO_ICALL                                         $10     
         17        SEND_VAR                                                 $10
         18        DO_ICALL                                         $11     
         19        SEND_VAR                                                 $11
         20        SEND_VAL                                                 0
         21        FETCH_OBJ_R                                      ~12     'length'
         22        SEND_VAL                                                 ~12
         23        DO_ICALL                                         $13     
         24        ASSIGN                                                   !1, $13
  180    25        ISSET_ISEMPTY_CV                                 ~15     !1
         26        TYPE_CHECK                                    8          ~15
         27      > JMPZ                                                     ~16, ->32
  181    28    >   NEW                                              $17     'RuntimeException'
         29        SEND_VAL_EX                                              'No+string+generated%2C+check+excluded+characters.'
         30        DO_FCALL                                      0          
         31      > THROW                                         0          $17
  183    32    >   FETCH_OBJ_R                                      ~19     'html'
         33        TYPE_CHECK                                    8          ~19
         34      > JMPZ                                                     ~20, ->39
  184    35    >   INIT_STATIC_METHOD_CALL                                  'passwordToHtml'
         36        SEND_VAR                                                 !1
         37        DO_FCALL                                      0  $21     
         38        ASSIGN                                                   !1, $21
  186    39    > > RETURN                                                   !1
  187    40*     > RETURN                                                   null

End of function output

Function getavailablecharacters:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  getAvailableCharacters
number of ops:  28
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  194     0  E >   INIT_FCALL                                               'implode'
          1        SEND_VAL                                                 ''
          2        INIT_FCALL                                               'array_diff'
          3        INIT_FCALL                                               'array_merge'
          4        FETCH_OBJ_R                                      ~0      'include'
          5        SEND_VAL                                                 ~0
          6        FETCH_OBJ_R                                      ~1      'lowercase'
          7        SEND_VAL                                                 ~1
          8        FETCH_OBJ_R                                      ~2      'uppercase'
          9        SEND_VAL                                                 ~2
         10        FETCH_OBJ_R                                      ~3      'numbers'
         11        SEND_VAL                                                 ~3
         12        FETCH_OBJ_R                                      ~4      'symbols'
         13        SEND_VAL                                                 ~4
         14        DO_ICALL                                         $5      
         15        SEND_VAR                                                 $5
         16        INIT_FCALL                                               'array_merge'
         17        FETCH_OBJ_R                                      ~6      'exclude'
         18        SEND_VAL                                                 ~6
         19        FETCH_OBJ_R                                      ~7      'extended'
         20        SEND_VAL                                                 ~7
         21        DO_ICALL                                         $8      
         22        SEND_VAR                                                 $8
         23        DO_ICALL                                         $9      
         24        SEND_VAR                                                 $9
         25        DO_ICALL                                         $10     
         26      > RETURN                                                   $10
  195    27*     > RETURN                                                   null

End of function getavailablecharacters

Function setexclude:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  setExclude
number of ops:  6
compiled vars:  !0 = $exclude
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  202     0  E >   RECV                                             !0      
  204     1        ASSIGN_OBJ                                               'exclude'
          2        OP_DATA                                                  !0
  205     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
  206     5*     > RETURN                                                   null

End of function setexclude

Function sethtml:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  setHtml
number of ops:  6
compiled vars:  !0 = $html
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  213     0  E >   RECV                                             !0      
  215     1        ASSIGN_OBJ                                               'html'
          2        OP_DATA                                                  !0
  216     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
  217     5*     > RETURN                                                   null

End of function sethtml

Function setinclude:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  setInclude
number of ops:  6
compiled vars:  !0 = $include
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  224     0  E >   RECV                                             !0      
  226     1        ASSIGN_OBJ                                               'include'
          2        OP_DATA                                                  !0
  227     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
  228     5*     > RETURN                                                   null

End of function setinclude

Function setlength:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  setLength
number of ops:  7
compiled vars:  !0 = $length
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  235     0  E >   RECV                                             !0      
  237     1        CAST                                          4  ~2      !0
          2        ASSIGN_OBJ                                               'length'
          3        OP_DATA                                                  ~2
  238     4        FETCH_THIS                                       ~3      
          5      > RETURN                                                   ~3
  239     6*     > RETURN                                                   null

End of function setlength

Function setlowercase:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  setLowercase
number of ops:  24
compiled vars:  !0 = $lowercase, !1 = $start, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  246     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      'a'
          2        RECV_INIT                                        !2      'z'
  248     3        BOOL                                             ~4      !0
          4        TYPE_CHECK                                    8          ~4
          5      > JMPZ                                                     ~5, ->18
          6    >   INIT_FCALL                                               'range'
          7        INIT_FCALL                                               'strtolower'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $6      
         10        SEND_VAR                                                 $6
         11        INIT_FCALL                                               'strtolower'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $7      
         14        SEND_VAR                                                 $7
         15        DO_ICALL                                         $8      
         16        QM_ASSIGN                                        ~9      $8
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~9      <array>
         19    >   ASSIGN_OBJ                                               'lowercase'
         20        OP_DATA                                                  ~9
  249    21        FETCH_THIS                                       ~10     
         22      > RETURN                                                   ~10
  250    23*     > RETURN                                                   null

End of function setlowercase

Function setnumbers:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
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: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  setNumbers
number of ops:  20
compiled vars:  !0 = $numbers, !1 = $start, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  257     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      0
          2        RECV_INIT                                        !2      9
  259     3        BOOL                                             ~4      !0
          4        TYPE_CHECK                                    8          ~4
          5      > JMPZ                                                     ~5, ->14
          6    >   INIT_FCALL                                               'range'
          7        CAST                                          4  ~6      !1
          8        SEND_VAL                                                 ~6
          9        CAST                                          4  ~7      !2
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                         $8      
         12        QM_ASSIGN                                        ~9      $8
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~9      <array>
         15    >   ASSIGN_OBJ                                               'numbers'
         16        OP_DATA                                                  ~9
  260    17        FETCH_THIS                                       ~10     
         18      > RETURN                                                   ~10
  261    19*     > RETURN                                                   null

End of function setnumbers

Function setrepeat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  setRepeat
number of ops:  7
compiled vars:  !0 = $repeat
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  268     0  E >   RECV                                             !0      
  270     1        CAST                                          4  ~2      !0
          2        ASSIGN_OBJ                                               'repeat'
          3        OP_DATA                                                  ~2
  271     4        FETCH_THIS                                       ~3      
          5      > RETURN                                                   ~3
  272     6*     > RETURN                                                   null

End of function setrepeat

Function setsymbols:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 23
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r45f4
function name:  setSymbols
number of ops:  29
compiled vars:  !0 = $symbols
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  279     0  E >   RECV                                             !0      
  281     1        BOOL                                             ~2      !0
          2        TYPE_CHECK                                    8          ~2
          3      > JMPZ                                                     ~3, ->23
          4    >   INIT_FCALL                                               'array_merge'
          5        INIT_FCALL                                               'range'
          6        SEND_VAL                                                 '%21'
          7        SEND_VAL                                                 '%2F'
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        INIT_FCALL                                               'range'
         11        SEND_VAL                                                 '%3A'
         12        SEND_VAL                                                 '%40'
         13        DO_ICALL                                         $5      
         14        SEND_VAR                                                 $5
         15        INIT_FCALL                                               'range'
         16        SEND_VAL                                                 '%5B'
         17        SEND_VAL                                                 '%60'
         18        DO_ICALL                                         $6      
         19        SEND_VAR                                                 $6
         20        DO_ICALL                                         $7      
         21        QM_ASSIGN                                        ~8      $7
         22      > JMP                                                      ->24
         23    >   QM_ASSIGN                                        ~8      <array>
         24    >   ASSIGN_OBJ                                               'symbols'
         25        OP_DATA 

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.41 ms | 1428 KiB | 37 Q