3v4l.org

run code in 300+ PHP versions simultaneously
<?php class URI implements \ArrayAccess, \Iterator, \Countable, \JsonSerializable { const SCHEME = 0x01; const USER = 0x02; const PASS = 0x04; const HOST = 0x08; const PORT = 0x10; const PATH = 0x20; const QUERY = 0x40; const FRAGMENT = 0x80; // The private props and magic methods are only implemented like this to give type validation, // these are effectively public properties private $scheme; private $user; private $pass; private $host; private $port; private $path; private $query; private $fragment; // obviously these two properties would be handled internally in a native impl private static $constPropMap = [ self::SCHEME => 'scheme', self::USER => 'user', self::PASS => 'pass', self::HOST => 'host', self::PORT => 'port', self::PATH => 'path', self::QUERY => 'query', self::FRAGMENT => 'fragment', ]; private $iterationPointer = self::SCHEME; private function validateScheme($value) { // in the generic URI syntax, only the format of the scheme is rigid return (bool) preg_match('/^[a-z][a-z0-9+.\-]*$/i', $value); } public function __construct($uri) { $parts = []; $this->query = new QueryLevel; if (((string) $uri) !== '' && false === $parts = parse_url($uri)) { throw new \InvalidArgumentException('Invalid URI'); } foreach ($parts as $name => $value) { $this->__set($name, urldecode($value)); } } public function __get($name) { if (!in_array($name, self::$constPropMap)) { trigger_error('Undefined property: ' . __CLASS__ . '::$' . $name, E_USER_NOTICE); return null; } return $this->$name; } public function __set($name, $value) { if ($value === null) { $this->$name = null; } else if ($name === 'port') { $this->port = (int) $value; } else if ($name === 'query') { parse_str($value, $query); $this->query = new QueryLevel($query); } else if (in_array($name, self::$constPropMap)) { if ($name === 'scheme' && !$this->validateScheme($value)) { throw new \InvalidArgumentException('Invalid URI scheme'); } $this->$name = (string) $value; } else { // because PHP allows expando properties on anything afaik :-( $this->$name = $value; } } public function __toString() { $result = ''; if (isset($this->scheme)) { $result = $this->scheme . ':'; } if (isset($this->host)) { $result .= '//'; if (isset($this->user)) { $result .= urlencode($this->user); if (isset($this->pass)) { $result .= ':' . urlencode($this->pass); } $result .= '@'; } $result .= urlencode($this->host); if (isset($this->port)) { $result .= ':' . $this->port; } } if (isset($this->path)) { $result .= $this->path; } if (!empty($this->query)) { $result .= '?' . http_build_query($this->query); } if (isset($this->fragment)) { $result .= '#' . urlencode($this->fragment); } return $result; } /* ArrayAccess */ public function offsetExists($name) { return isset($this->$name) || isset(self::$constPropMap[$name]); } public function offsetGet($name) { if (isset(self::$constPropMap[$name])) { return $this->__get(self::$constPropMap[$name]); } else { return $this->__get($name); } } public function offsetSet($name, $value) { if (isset(self::$constPropMap[$name])) { $this->__set(self::$constPropMap[$name], $value); } else { $this->__set($name, $value); } } public function offsetUnset($name) { if (isset(self::$constPropMap[$name])) { $this->__set(self::$constPropMap[$name], null); } else if (in_array($name, self::$constPropMap)) { $this->__set($name, null); } else { unset($this->$name); } } /* Iterator */ public function current() { return $this->{self::$constPropMap[$this->iterationPointer]}; } public function key() { return self::$constPropMap[$this->iterationPointer]; } public function next() { $this->iterationPointer *= 2; } public function rewind() { $this->iterationPointer = self::SCHEME; } public function valid() { return $this->iterationPointer <= self::FRAGMENT; } /* Countable */ public function count() { $result = 0; foreach (self::$constPropMap as $const => $name) { if ($this->$name !== null) { $result++; } } return $result; } /* JsonSerializable */ public function jsonSerialize() { return $this->__toString(); } } class QueryLevel implements \ArrayAccess, \Iterator, \Countable { private $elements = []; private $iterationValid; private function encodeElement($name, $value, $nameFormat = '%s') { $result = null; if ($value !== null) { $name = sprintf($nameFormat, $name); if ($value instanceof QueryLevel) { $result = []; foreach ($value as $subName => $subValue) { $result[] = $this->encodeElement($subName, $subValue, $name . '[%s]'); } $result = implode('&', $result); } else { if (is_bool($value)) { $value = (int) $value; } $result = urlencode($name) . '=' . urlencode($value); } } return $result; } public function __construct($elements = []) { if (!is_array($elements) && !($elements instanceof QueryLevel)) { if (is_object($elements)) { $elements = get_object_vars($elements); } else { $elements = (array) $elements; } } foreach ($elements as $name => $value) { $this->__set($name, $value); } } public function __get($name) { if (!array_key_exists($name, $this->elements)) { trigger_error('Undefined property: ' . __CLASS__ . '::$' . $name, E_USER_NOTICE); return null; } return $this->elements[$name]; } public function __set($name, $value) { if (is_scalar($value) || $value === null) { $this->elements[$name] = $value; } else { $this->elements[$name] = new static($value); } } public function __toString() { $result = []; foreach ($this->elements as $name => $value) { if (!is_numeric($name) && null !== $encoded = $this->encodeElement($name, $value)) { $result[] = $encoded; } } return implode('&', $result); } /* ArrayAccess */ public function offsetExists($name) { return isset($this->elements[$name]); } public function offsetGet($name) { return $this->__get($name); } public function offsetSet($name, $value) { $this->__set($name, $value); } public function offsetUnset($name) { unset($this->elements[$name]); } /* Iterator */ public function current() { return current($this->elements); } public function key() { return key($this->elements); } public function next() { $this->iterationValid = each($this->elements) !== false; } public function rewind() { reset($this->elements); $this->iterationValid = (bool) count($this->elements); } public function valid() { return $this->iterationValid; } /* Countable */ public function count() { return count($this->elements); } } $uri = new URI('http://www.google.com/'); $uri['query']['foo'] = '&bar'; echo $uri;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbQu
function name:  (null)
number of ops:  11
compiled vars:  !0 = $uri
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'uri'
  218     1        DECLARE_CLASS                                            'querylevel'
  356     2        NEW                                              $1      'URI'
          3        SEND_VAL_EX                                              'http%3A%2F%2Fwww.google.com%2F'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
  357     6        FETCH_DIM_W                                      $4      !0, 'query'
          7        ASSIGN_DIM                                               $4, 'foo'
          8        OP_DATA                                                  '%26bar'
  359     9        ECHO                                                     !0
         10      > RETURN                                                   1

Class URI:
Function validatescheme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbQu
function name:  validateScheme
number of ops:  8
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
   41     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%5Ba-z%5D%5Ba-z0-9%2B.%5C-%5D%2A%24%2Fi'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        BOOL                                             ~2      $1
          6      > RETURN                                                   ~2
   42     7*     > RETURN                                                   null

End of function validatescheme

Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 31
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 31
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
Branch analysis from position: 15
filename:       /in/ufbQu
function name:  __construct
number of ops:  33
compiled vars:  !0 = $uri, !1 = $parts, !2 = $value, !3 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   44     0  E >   RECV                                             !0      
   46     1        ASSIGN                                                   !1, <array>
   47     2        NEW                                              $6      'QueryLevel'
          3        DO_FCALL                                      0          
          4        ASSIGN_OBJ                                               'query'
          5        OP_DATA                                                  $6
   49     6        CAST                                          6  ~8      !0
          7        IS_NOT_IDENTICAL                                 ~9      ~8, ''
          8      > JMPZ_EX                                          ~9      ~9, ->15
          9    >   INIT_FCALL                                               'parse_url'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $10     
         12        ASSIGN                                           ~11     !1, $10
         13        TYPE_CHECK                                    4  ~12     ~11
         14        BOOL                                             ~9      ~12
         15    > > JMPZ                                                     ~9, ->20
   50    16    >   NEW                                              $13     'InvalidArgumentException'
         17        SEND_VAL_EX                                              'Invalid+URI'
         18        DO_FCALL                                      0          
         19      > THROW                                         0          $13
   53    20    > > FE_RESET_R                                       $15     !1, ->31
         21    > > FE_FETCH_R                                       ~16     $15, !2, ->31
         22    >   ASSIGN                                                   !3, ~16
   54    23        INIT_METHOD_CALL                                         '__set'
         24        SEND_VAR_EX                                              !3
         25        INIT_FCALL                                               'urldecode'
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                         $18     
         28        SEND_VAR_NO_REF_EX                                       $18
         29        DO_FCALL                                      0          
   53    30      > JMP                                                      ->21
         31    >   FE_FREE                                                  $15
   56    32      > RETURN                                                   null

End of function __construct

Function __get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbQu
function name:  __get
number of ops:  17
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   58     0  E >   RECV                                             !0      
   60     1        INIT_FCALL                                               'in_array'
          2        SEND_VAR                                                 !0
          3        FETCH_STATIC_PROP_R          global lock         ~1      'constPropMap'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                         $2      
          6        BOOL_NOT                                         ~3      $2
          7      > JMPZ                                                     ~3, ->14
   61     8    >   INIT_FCALL                                               'trigger_error'
          9        CONCAT                                           ~4      'Undefined+property%3A+URI%3A%3A%24', !0
         10        SEND_VAL                                                 ~4
         11        SEND_VAL                                                 1024
         12        DO_ICALL                                                 
   62    13      > RETURN                                                   null
   65    14    >   FETCH_OBJ_R                                      ~6      !0
         15      > RETURN                                                   ~6
   66    16*     > RETURN                                                   null

End of function __get

Function __set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 25
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 47
Branch analysis from position: 31
2 jumps found. (Code = 46) Position 1 = 33, Position 2 = 38
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 43
Branch analysis from position: 39
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
Branch analysis from position: 38
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbQu
function name:  __set
number of ops:  50
compiled vars:  !0 = $name, !1 = $value, !2 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   68     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   70     2        TYPE_CHECK                                    2          !1
          3      > JMPZ                                                     ~3, ->7
   71     4    >   ASSIGN_OBJ                                               !0
          5        OP_DATA                                                  null
          6      > JMP                                                      ->49
   72     7    >   IS_IDENTICAL                                             !0, 'port'
          8      > JMPZ                                                     ~5, ->13
   73     9    >   CAST                                          4  ~7      !1
         10        ASSIGN_OBJ                                               'port'
         11        OP_DATA                                                  ~7
         12      > JMP                                                      ->49
   74    13    >   IS_IDENTICAL                                             !0, 'query'
         14      > JMPZ                                                     ~8, ->25
   75    15    >   INIT_FCALL                                               'parse_str'
         16        SEND_VAR                                                 !1
         17        SEND_REF                                                 !2
         18        DO_ICALL                                                 
   76    19        NEW                                              $11     'QueryLevel'
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0          
         22        ASSIGN_OBJ                                               'query'
         23        OP_DATA                                                  $11
         24      > JMP                                                      ->49
   77    25    >   INIT_FCALL                                               'in_array'
         26        SEND_VAR                                                 !0
         27        FETCH_STATIC_PROP_R          unknown             ~13     'constPropMap'
         28        SEND_VAL                                                 ~13
         29        DO_ICALL                                         $14     
         30      > JMPZ                                                     $14, ->47
   78    31    >   IS_IDENTICAL                                     ~15     !0, 'scheme'
         32      > JMPZ_EX                                          ~15     ~15, ->38
         33    >   INIT_METHOD_CALL                                         'validateScheme'
         34        SEND_VAR                                                 !1
         35        DO_FCALL                                      0  $16     
         36        BOOL_NOT                                         ~17     $16
         37        BOOL                                             ~15     ~17
         38    > > JMPZ                                                     ~15, ->43
   79    39    >   NEW                                              $18     'InvalidArgumentException'
         40        SEND_VAL_EX                                              'Invalid+URI+scheme'
         41        DO_FCALL                                      0          
         42      > THROW                                         0          $18
   82    43    >   CAST                                          6  ~21     !1
         44        ASSIGN_OBJ                                               !0
         45        OP_DATA                                                  ~21
         46      > JMP                                                      ->49
   85    47    >   ASSIGN_OBJ                                               !0
         48        OP_DATA                                                  !1
   87    49    > > RETURN                                                   null

End of function __set

Function __tostring:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 35
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 25
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 24
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 35
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 39
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 48
Branch analysis from position: 42
2 jumps found. (Code = 43) Position 1 = 50, Position 2 = 56
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 56
Branch analysis from position: 48
Branch analysis from position: 39
Branch analysis from position: 35
Branch analysis from position: 24
Branch analysis from position: 25
Branch analysis from position: 35
Branch analysis from position: 6
filename:       /in/ufbQu
function name:  __toString
number of ops:  60
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   91     0  E >   ASSIGN                                                   !0, ''
   93     1        ISSET_ISEMPTY_PROP_OBJ                                   'scheme'
          2      > JMPZ                                                     ~2, ->6
   94     3    >   FETCH_OBJ_R                                      ~3      'scheme'
          4        CONCAT                                           ~4      ~3, '%3A'
          5        ASSIGN                                                   !0, ~4
   97     6    >   ISSET_ISEMPTY_PROP_OBJ                                   'host'
          7      > JMPZ                                                     ~6, ->35
   98     8    >   ASSIGN_OP                                     8          !0, '%2F%2F'
  100     9        ISSET_ISEMPTY_PROP_OBJ                                   'user'
         10      > JMPZ                                                     ~8, ->25
  101    11    >   INIT_FCALL                                               'urlencode'
         12        FETCH_OBJ_R                                      ~9      'user'
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                         $10     
         15        ASSIGN_OP                                     8          !0, $10
  103    16        ISSET_ISEMPTY_PROP_OBJ                                   'pass'
         17      > JMPZ                                                     ~12, ->24
  104    18    >   INIT_FCALL                                               'urlencode'
         19        FETCH_OBJ_R                                      ~13     'pass'
         20        SEND_VAL                                                 ~13
         21        DO_ICALL                                         $14     
         22        CONCAT                                           ~15     '%3A', $14
         23        ASSIGN_OP                                     8          !0, ~15
  107    24    >   ASSIGN_OP                                     8          !0, '%40'
  110    25    >   INIT_FCALL                                               'urlencode'
         26        FETCH_OBJ_R                                      ~18     'host'
         27        SEND_VAL                                                 ~18
         28        DO_ICALL                                         $19     
         29        ASSIGN_OP                                     8          !0, $19
  112    30        ISSET_ISEMPTY_PROP_OBJ                                   'port'
         31      > JMPZ                                                     ~21, ->35
  113    32    >   FETCH_OBJ_R                                      ~22     'port'
         33        CONCAT                                           ~23     '%3A', ~22
         34        ASSIGN_OP                                     8          !0, ~23
  117    35    >   ISSET_ISEMPTY_PROP_OBJ                                   'path'
         36      > JMPZ                                                     ~25, ->39
  118    37    >   FETCH_OBJ_R                                      ~26     'path'
         38        ASSIGN_OP                                     8          !0, ~26
  121    39    >   ISSET_ISEMPTY_PROP_OBJ                           ~28     'query'
         40        BOOL_NOT                                         ~29     ~28
         41      > JMPZ                                                     ~29, ->48
  122    42    >   INIT_FCALL                                               'http_build_query'
         43        FETCH_OBJ_R                                      ~30     'query'
         44        SEND_VAL                                                 ~30
         45        DO_ICALL                                         $31     
         46        CONCAT                                           ~32     '%3F', $31
         47        ASSIGN_OP                                     8          !0, ~32
  125    48    >   ISSET_ISEMPTY_PROP_OBJ                                   'fragment'
         49      > JMPZ                                                     ~34, ->56
  126    50    >   INIT_FCALL                                               'urlencode'
         51        FETCH_OBJ_R                                      ~35     'fragment'
         52        SEND_VAL                                                 ~35
         53        DO_ICALL                                         $36     
         54        CONCAT                                           ~37     '%23', $36
         55        ASSIGN_OP                                     8          !0, ~37
  129    56    >   VERIFY_RETURN_TYPE                                       !0
         57      > RETURN                                                   !0
  130    58*       VERIFY_RETURN_TYPE                                       
         59*     > RETURN                                                   null

End of function __tostring

Function offsetexists:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/ufbQu
function name:  offsetExists
number of ops:  8
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  134     0  E >   RECV                                             !0      
  136     1        ISSET_ISEMPTY_PROP_OBJ                           ~1      !0
          2      > JMPNZ_EX                                         ~1      ~1, ->6
          3    >   FETCH_STATIC_PROP_IS                             ~2      'constPropMap'
          4        ISSET_ISEMPTY_DIM_OBJ                         0  ~3      ~2, !0
          5        BOOL                                             ~1      ~3
          6    > > RETURN                                                   ~1
  137     7*     > RETURN                                                   null

End of function offsetexists

Function offsetget:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbQu
function name:  offsetGet
number of ops:  17
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  139     0  E >   RECV                                             !0      
  141     1        FETCH_STATIC_PROP_IS                             ~1      'constPropMap'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, !0
          3      > JMPZ                                                     ~2, ->12
  142     4    >   INIT_METHOD_CALL                                         '__get'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_STATIC_PROP_FUNC_ARG   unknown             $3      'constPropMap'
          7        FETCH_DIM_FUNC_ARG                               $4      $3, !0
          8        SEND_FUNC_ARG                                            $4
          9        DO_FCALL                                      0  $5      
         10      > RETURN                                                   $5
         11*       JMP                                                      ->16
  144    12    >   INIT_METHOD_CALL                                         '__get'
         13        SEND_VAR_EX                                              !0
         14        DO_FCALL                                      0  $6      
         15      > RETURN                                                   $6
  146    16*     > RETURN                                                   null

End of function offsetget

Function offsetset:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbQu
function name:  offsetSet
number of ops:  18
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  148     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  150     2        FETCH_STATIC_PROP_IS                             ~2      'constPropMap'
          3        ISSET_ISEMPTY_DIM_OBJ                         0          ~2, !0
          4      > JMPZ                                                     ~3, ->13
  151     5    >   INIT_METHOD_CALL                                         '__set'
          6        CHECK_FUNC_ARG                                           
          7        FETCH_STATIC_PROP_FUNC_ARG   unknown             $4      'constPropMap'
          8        FETCH_DIM_FUNC_ARG                               $5      $4, !0
          9        SEND_FUNC_ARG                                            $5
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
         12      > JMP                                                      ->17
  153    13    >   INIT_METHOD_CALL                                         '__set'
         14        SEND_VAR_EX                                              !0
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0          
  155    17    > > RETURN                                                   null

End of function offsetset

Function offsetunset:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 12
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: 12
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbQu
function name:  offsetUnset
number of ops:  25
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  157     0  E >   RECV                                             !0      
  159     1        FETCH_STATIC_PROP_IS                             ~1      'constPropMap'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, !0
          3      > JMPZ                                                     ~2, ->12
  160     4    >   INIT_METHOD_CALL                                         '__set'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_STATIC_PROP_FUNC_ARG   unknown             $3      'constPropMap'
          7        FETCH_DIM_FUNC_ARG                               $4      $3, !0
          8        SEND_FUNC_ARG                                            $4
          9        SEND_VAL_EX                                              null
         10        DO_FCALL                                      0          
         11      > JMP                                                      ->24
  161    12    >   INIT_FCALL                                               'in_array'
         13        SEND_VAR                                                 !0
         14        FETCH_STATIC_PROP_R          unknown             ~6      'constPropMap'
         15        SEND_VAL                                                 ~6
         16        DO_ICALL                                         $7      
         17      > JMPZ                                                     $7, ->23
  162    18    >   INIT_METHOD_CALL                                         '__set'
         19        SEND_VAR_EX                                              !0
         20        SEND_VAL_EX                                              null
         21        DO_FCALL                                      0          
         22      > JMP                                                      ->24
  164    23    >   UNSET_OBJ                                                !0
  166    24    > > RETURN                                                   null

End of function offsetunset

Function current:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbQu
function name:  current
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  172     0  E >   FETCH_OBJ_R                                      ~1      'iterationPointer'
          1        FETCH_STATIC_PROP_R          unknown             ~0      'constPropMap'
          2        FETCH_DIM_R                                      ~2      ~0, ~1
          3        FETCH_OBJ_R                                      ~3      ~2
          4      > RETURN                                                   ~3
  173     5*     > RETURN                                                   null

End of function current

Function key:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbQu
function name:  key
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  177     0  E >   FETCH_OBJ_R                                      ~1      'iterationPointer'
          1        FETCH_STATIC_PROP_R          unknown             ~0      'constPropMap'
          2        FETCH_DIM_R                                      ~2      ~0, ~1
          3      > RETURN                                                   ~2
  178     4*     > RETURN                                                   null

End of function key

Function next:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbQu
function name:  next
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  182     0  E >   ASSIGN_OBJ_OP                                 3          'iterationPointer'
          1        OP_DATA                                                  2
  183     2      > RETURN                                                   null

End of function next

Function rewind:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbQu
function name:  rewind
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  187     0  E >   ASSIGN_OBJ                                               'iterationPointer'
          1        OP_DATA                                                  1
  188     2      > RETURN                                                   null

End of function rewind

Function valid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbQu
function name:  valid
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  192     0  E >   FETCH_OBJ_R                                      ~0      'iterationPointer'
          1        IS_SMALLER_OR_EQUAL                              ~1      ~0, 128
          2      > RETURN                                                   ~1
  193     3*     > RETURN                                                   null

End of function valid

Function count:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from positio

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
276.29 ms | 1428 KiB | 30 Q