3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ /** * Provides a property based interface to an array. * The data are read-only unless $allowModifications is set to true * on construction. * * Implements Countable, Iterator and ArrayAccess * to facilitate easy access to the data. */ class Config implements Countable, Iterator, ArrayAccess { /** * Whether modifications to configuration data are allowed. * * @var bool */ protected $allowModifications; /** * Number of elements in configuration data. * * @var int */ protected $count; /** * Data withing the configuration. * * @var array */ protected $data = array(); /** * Used when unsetting values during iteration to ensure we do not skip * the next element. * * @var bool */ protected $skipNextIteration; /** * Constructor. * * Data is read-only unless $allowModifications is set to true * on construction. * * @param array $array * @param bool $allowModifications */ public function __construct(array $array, $allowModifications = false) { $this->allowModifications = (bool) $allowModifications; foreach ($array as $key => $value) { if (is_array($value)) { $this->data[$key] = new static($value, $this->allowModifications); } else { $this->data[$key] = $value; } $this->count++; } } /** * Retrieve a value and return $default if there is no element set. * * @param string $name * @param mixed $default * @return mixed */ public function get($name, $default = null) { if (array_key_exists($name, $this->data)) { return $this->data[$name]; } return $default; } /** * Magic function so that $obj->value will work. * * @param string $name * @return mixed */ public function __get($name) { return $this->get($name); } /** * Set a value in the config. * * Only allow setting of a property if $allowModifications was set to true * on construction. Otherwise, throw an exception. * * @param string $name * @param mixed $value * @return void * @throws Exception\RuntimeException */ public function __set($name, $value) { if ($this->allowModifications) { if (is_array($value)) { $value = new static($value, true); } if (null === $name) { $this->data[] = $value; } else { $this->data[$name] = $value; } $this->count++; } else { throw new Exception\RuntimeException('Config is read only'); } } /** * Deep clone of this instance to ensure that nested Zend\Configs are also * cloned. * * @return void */ public function __clone() { $array = array(); foreach ($this->data as $key => $value) { if ($value instanceof self) { $array[$key] = clone $value; } else { $array[$key] = $value; } } $this->data = $array; } /** * Return an associative array of the stored data. * * @return array */ public function toArray() { $array = array(); $data = $this->data; /** @var self $value */ foreach ($data as $key => $value) { if ($value instanceof self) { $array[$key] = $value->toArray(); } else { $array[$key] = $value; } } return $array; } /** * isset() overloading * * @param string $name * @return bool */ public function __isset($name) { return isset($this->data[$name]); } /** * unset() overloading * * @param string $name * @return void * @throws Exception\InvalidArgumentException */ public function __unset($name) { if (!$this->allowModifications) { throw new Exception\InvalidArgumentException('Config is read only'); } elseif (isset($this->data[$name])) { unset($this->data[$name]); $this->count--; $this->skipNextIteration = true; } } /** * count(): defined by Countable interface. * * @see Countable::count() * @return int */ public function count() { return $this->count; } /** * current(): defined by Iterator interface. * * @see Iterator::current() * @return mixed */ public function current() { $this->skipNextIteration = false; return current($this->data); } /** * key(): defined by Iterator interface. * * @see Iterator::key() * @return mixed */ public function key() { return key($this->data); } /** * next(): defined by Iterator interface. * * @see Iterator::next() * @return void */ public function next() { if ($this->skipNextIteration) { $this->skipNextIteration = false; return; } next($this->data); } /** * rewind(): defined by Iterator interface. * * @see Iterator::rewind() * @return void */ public function rewind() { $this->skipNextIteration = false; reset($this->data); } /** * valid(): defined by Iterator interface. * * @see Iterator::valid() * @return bool */ public function valid() { return ($this->key() !== null); } /** * offsetExists(): defined by ArrayAccess interface. * * @see ArrayAccess::offsetExists() * @param mixed $offset * @return bool */ public function offsetExists($offset) { return $this->__isset($offset); } /** * offsetGet(): defined by ArrayAccess interface. * * @see ArrayAccess::offsetGet() * @param mixed $offset * @return mixed */ public function offsetGet($offset) { return $this->__get($offset); } /** * offsetSet(): defined by ArrayAccess interface. * * @see ArrayAccess::offsetSet() * @param mixed $offset * @param mixed $value * @return void */ public function offsetSet($offset, $value) { $this->__set($offset, $value); } /** * offsetUnset(): defined by ArrayAccess interface. * * @see ArrayAccess::offsetUnset() * @param mixed $offset * @return void */ public function offsetUnset($offset) { $this->__unset($offset); } /** * Merge another Config with this one. * * For duplicate keys, the following will be performed: * - Nested Configs will be recursively merged. * - Items in $merge with INTEGER keys will be appended. * - Items in $merge with STRING keys will overwrite current values. * * @param Config $merge * @return Config */ public function merge(Config $merge) { /** @var Config $value */ foreach ($merge as $key => $value) { if (array_key_exists($key, $this->data)) { if (is_int($key)) { $this->data[] = $value; } elseif ($value instanceof self && $this->data[$key] instanceof self) { $this->data[$key]->merge($value); } else { if ($value instanceof self) { $this->data[$key] = new static($value->toArray(), $this->allowModifications); } else { $this->data[$key] = $value; } } } else { if ($value instanceof self) { $this->data[$key] = new static($value->toArray(), $this->allowModifications); } else { $this->data[$key] = $value; } $this->count++; } } return $this; } /** * Prevent any more modifications being made to this instance. * * Useful after merge() has been used to merge multiple Config objects * into one object which should then not be modified again. * * @return void */ public function setReadOnly() { $this->allowModifications = false; /** @var Config $value */ foreach ($this->data as $value) { if ($value instanceof self) { $value->setReadOnly(); } } } /** * Returns whether this Config object is read only or not. * * @return bool */ public function isReadOnly() { return !$this->allowModifications; } } $obj = new Config( array( 'titulo' => 'CAWZ :: Central Admin Web Zone', 'dominio' => $_SERVER['HTTP_HOST'], 'urlActual' => $_SERVER['REQUEST_URI'], 'pagina' => basename($_SERVER['SCRIPT_NAME']), 'basePath' => dirname($_SERVER['DOCUMENT_ROOT']), 'clases' => dirname(dirname($_SERVER['DOCUMENT_ROOT'])) . '/libs', 'plantillas' => dirname($_SERVER['DOCUMENT_ROOT']) . '/plantillas/', 'traducciones' => dirname(dirname($_SERVER['DOCUMENT_ROOT'])) . '/idiomas', 'imagenes' => array( 'apartamentos' => array( 'path' => dirname($_SERVER['DOCUMENT_ROOT']) . '/www/apartamentos', 'sizes' => array('s' => '120x90', 'm' => '120x90', 'l' => '120x90'), ) ), 'idioma' => array( 'base' => 'es', 'locales' => array('es' => 'es_ES.UTF8', 'en' => 'en_US.UTF8') ), 'debug' => true ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4l1Y8
function name:  (null)
number of ops:  64
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   DECLARE_CLASS                                            'config'
  399     1        NEW                                              $1      'Config'
  401     2        INIT_ARRAY                                       ~2      'CAWZ+%3A%3A+Central+Admin+Web+Zone', 'titulo'
  402     3        FETCH_R                      global              ~3      '_SERVER'
          4        FETCH_DIM_R                                      ~4      ~3, 'HTTP_HOST'
          5        ADD_ARRAY_ELEMENT                                ~2      ~4, 'dominio'
  403     6        FETCH_R                      global              ~5      '_SERVER'
          7        FETCH_DIM_R                                      ~6      ~5, 'REQUEST_URI'
          8        ADD_ARRAY_ELEMENT                                ~2      ~6, 'urlActual'
  404     9        INIT_FCALL                                               'basename'
         10        FETCH_R                      global              ~7      '_SERVER'
         11        FETCH_DIM_R                                      ~8      ~7, 'SCRIPT_NAME'
         12        SEND_VAL                                                 ~8
         13        DO_ICALL                                         $9      
         14        ADD_ARRAY_ELEMENT                                ~2      $9, 'pagina'
  405    15        INIT_FCALL                                               'dirname'
         16        FETCH_R                      global              ~10     '_SERVER'
         17        FETCH_DIM_R                                      ~11     ~10, 'DOCUMENT_ROOT'
         18        SEND_VAL                                                 ~11
         19        DO_ICALL                                         $12     
         20        ADD_ARRAY_ELEMENT                                ~2      $12, 'basePath'
  406    21        INIT_FCALL                                               'dirname'
         22        INIT_FCALL                                               'dirname'
         23        FETCH_R                      global              ~13     '_SERVER'
         24        FETCH_DIM_R                                      ~14     ~13, 'DOCUMENT_ROOT'
         25        SEND_VAL                                                 ~14
         26        DO_ICALL                                         $15     
         27        SEND_VAR                                                 $15
         28        DO_ICALL                                         $16     
         29        CONCAT                                           ~17     $16, '%2Flibs'
         30        ADD_ARRAY_ELEMENT                                ~2      ~17, 'clases'
  407    31        INIT_FCALL                                               'dirname'
         32        FETCH_R                      global              ~18     '_SERVER'
         33        FETCH_DIM_R                                      ~19     ~18, 'DOCUMENT_ROOT'
         34        SEND_VAL                                                 ~19
         35        DO_ICALL                                         $20     
         36        CONCAT                                           ~21     $20, '%2Fplantillas%2F'
         37        ADD_ARRAY_ELEMENT                                ~2      ~21, 'plantillas'
  408    38        INIT_FCALL                                               'dirname'
         39        INIT_FCALL                                               'dirname'
         40        FETCH_R                      global              ~22     '_SERVER'
         41        FETCH_DIM_R                                      ~23     ~22, 'DOCUMENT_ROOT'
         42        SEND_VAL                                                 ~23
         43        DO_ICALL                                         $24     
         44        SEND_VAR                                                 $24
         45        DO_ICALL                                         $25     
         46        CONCAT                                           ~26     $25, '%2Fidiomas'
         47        ADD_ARRAY_ELEMENT                                ~2      ~26, 'traducciones'
  411    48        INIT_FCALL                                               'dirname'
         49        FETCH_R                      global              ~27     '_SERVER'
         50        FETCH_DIM_R                                      ~28     ~27, 'DOCUMENT_ROOT'
         51        SEND_VAL                                                 ~28
         52        DO_ICALL                                         $29     
         53        CONCAT                                           ~30     $29, '%2Fwww%2Fapartamentos'
         54        INIT_ARRAY                                       ~31     ~30, 'path'
  401    55        ADD_ARRAY_ELEMENT                                ~31     <array>, 'sizes'
         56        INIT_ARRAY                                       ~32     ~31, 'apartamentos'
         57        ADD_ARRAY_ELEMENT                                ~2      ~32, 'imagenes'
         58        ADD_ARRAY_ELEMENT                                ~2      <array>, 'idioma'
         59        ADD_ARRAY_ELEMENT                                ~2      <true>, 'debug'
         60        SEND_VAL_EX                                              ~2
         61        DO_FCALL                                      0          
  399    62        ASSIGN                                                   !0, $1
  421    63      > RETURN                                                   1

Class Config:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 25
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 25
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/4l1Y8
function name:  __construct
number of ops:  27
compiled vars:  !0 = $array, !1 = $allowModifications, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   60     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
   62     2        BOOL                                             ~5      !1
          3        ASSIGN_OBJ                                               'allowModifications'
          4        OP_DATA                                                  ~5
   64     5      > FE_RESET_R                                       $6      !0, ->25
          6    > > FE_FETCH_R                                       ~7      $6, !2, ->25
          7    >   ASSIGN                                                   !3, ~7
   65     8        TYPE_CHECK                                  128          !2
          9      > JMPZ                                                     ~9, ->20
   66    10    >   NEW                          static              $12     
         11        SEND_VAR_EX                                              !2
         12        CHECK_FUNC_ARG                                           
         13        FETCH_OBJ_FUNC_ARG                               $13     'allowModifications'
         14        SEND_FUNC_ARG                                            $13
         15        DO_FCALL                                      0          
         16        FETCH_OBJ_W                                      $10     'data'
         17        ASSIGN_DIM                                               $10, !3
         18        OP_DATA                                                  $12
         19      > JMP                                                      ->23
   68    20    >   FETCH_OBJ_W                                      $15     'data'
         21        ASSIGN_DIM                                               $15, !3
         22        OP_DATA                                                  !2
   71    23    >   PRE_INC_OBJ                                              'count'
   64    24      > JMP                                                      ->6
         25    >   FE_FREE                                                  $6
   73    26      > RETURN                                                   null

End of function __construct

Function get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4l1Y8
function name:  get
number of ops:  10
compiled vars:  !0 = $name, !1 = $default
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   82     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
   84     2        FETCH_OBJ_R                                      ~2      'data'
          3        ARRAY_KEY_EXISTS                                         !0, ~2
          4      > JMPZ                                                     ~3, ->8
   85     5    >   FETCH_OBJ_R                                      ~4      'data'
          6        FETCH_DIM_R                                      ~5      ~4, !0
          7      > RETURN                                                   ~5
   88     8    > > RETURN                                                   !1
   89     9*     > RETURN                                                   null

End of function get

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4l1Y8
function name:  __get
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   97     0  E >   RECV                                             !0      
   99     1        INIT_METHOD_CALL                                         'get'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
  100     5*     > 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 = 22
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 11
Branch analysis from position: 22
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/4l1Y8
function name:  __set
number of ops:  27
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  113     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  115     2        FETCH_OBJ_R                                      ~2      'allowModifications'
          3      > JMPZ                                                     ~2, ->22
  117     4    >   TYPE_CHECK                                  128          !1
          5      > JMPZ                                                     ~3, ->11
  118     6    >   NEW                          static              $4      
          7        SEND_VAR_EX                                              !1
          8        SEND_VAL_EX                                              <true>
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $4
  121    11    >   TYPE_CHECK                                    2          !0
         12      > JMPZ                                                     ~7, ->17
  122    13    >   FETCH_OBJ_W                                      $8      'data'
         14        ASSIGN_DIM                                               $8
         15        OP_DATA                                                  !1
         16      > JMP                                                      ->20
  124    17    >   FETCH_OBJ_W                                      $10     'data'
         18        ASSIGN_DIM                                               $10, !0
         19        OP_DATA                                                  !1
  127    20    >   PRE_INC_OBJ                                              'count'
         21      > JMP                                                      ->26
  129    22    >   NEW                                              $13     'Exception%5CRuntimeException'
         23        SEND_VAL_EX                                              'Config+is+read+only'
         24        DO_FCALL                                      0          
         25      > THROW                                         0          $13
  131    26    > > RETURN                                                   null

End of function __set

Function __clone:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/4l1Y8
function name:  __clone
number of ops:  18
compiled vars:  !0 = $array, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  141     0  E >   ASSIGN                                                   !0, <array>
  143     1        FETCH_OBJ_R                                      ~4      'data'
          2      > FE_RESET_R                                       $5      ~4, ->14
          3    > > FE_FETCH_R                                       ~6      $5, !1, ->14
          4    >   ASSIGN                                                   !2, ~6
  144     5        INSTANCEOF                                               !1
          6      > JMPZ                                                     ~8, ->11
  145     7    >   CLONE                                            ~10     !1
          8        ASSIGN_DIM                                               !0, !2
          9        OP_DATA                                                  ~10
         10      > JMP                                                      ->13
  147    11    >   ASSIGN_DIM                                               !0, !2
         12        OP_DATA                                                  !1
  143    13    > > JMP                                                      ->3
         14    >   FE_FREE                                                  $5
  151    15        ASSIGN_OBJ                                               'data'
         16        OP_DATA                                                  !0
  152    17      > RETURN                                                   null

End of function __clone

Function toarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/4l1Y8
function name:  toArray
number of ops:  19
compiled vars:  !0 = $array, !1 = $data, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  161     0  E >   ASSIGN                                                   !0, <array>
  162     1        FETCH_OBJ_R                                      ~5      'data'
          2        ASSIGN                                                   !1, ~5
  165     3      > FE_RESET_R                                       $7      !1, ->16
          4    > > FE_FETCH_R                                       ~8      $7, !2, ->16
          5    >   ASSIGN                                                   !3, ~8
  166     6        INSTANCEOF                                               !2
          7      > JMPZ                                                     ~10, ->13
  167     8    >   INIT_METHOD_CALL                                         !2, 'toArray'
          9        DO_FCALL                                      0  $12     
         10        ASSIGN_DIM                                               !0, !3
         11        OP_DATA                                                  $12
         12      > JMP                                                      ->15
  169    13    >   ASSIGN_DIM                                               !0, !3
         14        OP_DATA                                                  !2
  165    15    > > JMP                                                      ->4
         16    >   FE_FREE                                                  $7
  173    17      > RETURN                                                   !0
  174    18*     > RETURN                                                   null

End of function toarray

Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4l1Y8
function name:  __isset
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  182     0  E >   RECV                                             !0      
  184     1        FETCH_OBJ_IS                                     ~1      'data'
          2        ISSET_ISEMPTY_DIM_OBJ                         0  ~2      ~1, !0
          3      > RETURN                                                   ~2
  185     4*     > RETURN                                                   null

End of function __isset

Function __unset:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/4l1Y8
function name:  __unset
number of ops:  18
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  194     0  E >   RECV                                             !0      
  196     1        FETCH_OBJ_R                                      ~1      'allowModifications'
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->9
  197     4    >   NEW                                              $3      'Exception%5CInvalidArgumentException'
          5        SEND_VAL_EX                                              'Config+is+read+only'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $3
          8*       JMP                                                      ->17
  198     9    >   FETCH_OBJ_IS                                     ~5      'data'
         10        ISSET_ISEMPTY_DIM_OBJ                         0          ~5, !0
         11      > JMPZ                                                     ~6, ->17
  199    12    >   FETCH_OBJ_UNSET                                  $7      'data'
         13        UNSET_DIM                                                $7, !0
  200    14        PRE_DEC_OBJ                                              'count'
  201    15        ASSIGN_OBJ                                               'skipNextIteration'
         16        OP_DATA                                                  <true>
  203    17    > > RETURN                                                   null

End of function __unset

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

End of function count

Function current:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4l1Y8
function name:  current
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  224     0  E >   ASSIGN_OBJ                                               'skipNextIteration'
          1        OP_DATA                                                  <false>
  225     2        INIT_FCALL                                               'current'
          3        FETCH_OBJ_R                                      ~1      'data'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
  226     7*     > 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/4l1Y8
function name:  key
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  236     0  E >   INIT_FCALL                                               'key'
          1        FETCH_OBJ_R                                      ~0      'data'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
  237     5*     > RETURN                                                   null

End of function key

Function next:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4l1Y8
function name:  next
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  247     0  E >   FETCH_OBJ_R                                      ~0      'skipNextIteration'
          1      > JMPZ                                                     ~0, ->5
  248     2    >   ASSIGN_OBJ                                               'skipNextIteration'
          3        OP_DATA                                                  <false>
  249     4      > RETURN                                                   null
  252     5    >   INIT_FCALL                                               'next'
          6        FETCH_OBJ_W                                      $2      'data'
          7        SEND_REF                                                 $2
          8        DO_ICALL                                                 
  253     9      > 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/4l1Y8
function name:  rewind
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  263     0  E >   ASSIGN_OBJ                                               'skipNextIteration'
          1        OP_DATA                                                  <false>
  264     2        INIT_FCALL                                               'reset'
          3        FETCH_OBJ_W                                      $1      'data'
          4        SEND_REF                                                 $1
          5        DO_ICALL                                                 
  265     6      > 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/4l1Y8
function name:  valid
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  275     0  E >   INIT_METHOD_CALL                                         'key'
          1        DO_FCALL                                      0  $0      
          2        TYPE_CHECK                                  1020  ~1      $0
          3      > RETURN                                                   ~1
  276     4*     > RETURN                                                   null

End of function valid

Function offsetexists:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4l1Y8
function name:  offsetExists
number of ops:  6
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  285     0  E >   RECV                                             !0      
  287     1        INIT_METHOD_CALL                                         '__isset'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
  288     5*     > RETURN                                                   null

End of function offsetexists

Function offsetget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4l1Y8
function name:  offsetGet
number of ops:  6
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  297     0  E >   RECV                                             !0      
  299     1        INIT_METHOD_CALL                                         '__get'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
  300     5*     > RETURN                                                   null

End of function offsetget

Function offsetset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4l1Y8
function name:  offsetSet
number of ops:  7
compiled vars:  !0 = $offset, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  310     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  312     2        INIT_METHOD_CALL                                         '__set'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
  313     6      > RETURN                                                   null

End of function offsetset

Function offsetunset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4l1Y8
function name:  offsetUnset
number of ops:  5
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  322     0  E >   RECV                                             !0      
  324     1        INIT_METHOD_CALL                                         '__unset'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
  325     4      > RETURN                                                   null

End of function offsetunset

Function merge:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 63
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 63
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 44
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps 

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.25 ms | 1428 KiB | 25 Q