3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * ParameterBag is a container for key/value pairs. * * @author Fabien Potencier <fabien@symfony.com> * * @api */ class ParameterBag implements \IteratorAggregate, \Countable { /** * Parameter storage. * * @var array */ protected $parameters; /** * Constructor. * * @param array $parameters An array of parameters * * @api */ public function __construct(array $parameters = array()) { $this->parameters = $parameters; } /** * Returns the parameters. * * @return array An array of parameters * * @api */ public function all() { return $this->parameters; } /** * Returns the parameter keys. * * @return array An array of parameter keys * * @api */ public function keys() { return array_keys($this->parameters); } /** * Replaces the current parameters by a new set. * * @param array $parameters An array of parameters * * @api */ public function replace(array $parameters = array()) { $this->parameters = $parameters; } /** * Adds parameters. * * @param array $parameters An array of parameters * * @api */ public function add(array $parameters = array()) { $this->parameters = array_replace($this->parameters, $parameters); } /** * Returns a parameter by name. * * @param string $path The key * @param mixed $default The default value if the parameter key does not exist * @param boolean $deep If true, a path like foo[bar] will find deeper items * * @return mixed * * @throws \InvalidArgumentException * * @api */ public function get($path, $default = null, $deep = false) { if (!$deep || false === $pos = strpos($path, '[')) { return array_key_exists($path, $this->parameters) ? $this->parameters[$path] : $default; } $root = substr($path, 0, $pos); if (!array_key_exists($root, $this->parameters)) { return $default; } $value = $this->parameters[$root]; $currentKey = null; for ($i = $pos, $c = strlen($path); $i < $c; $i++) { $char = $path[$i]; if ('[' === $char) { if (null !== $currentKey) { throw new \InvalidArgumentException(sprintf('Malformed path. Unexpected "[" at position %d.', $i)); } $currentKey = ''; } elseif (']' === $char) { if (null === $currentKey) { throw new \InvalidArgumentException(sprintf('Malformed path. Unexpected "]" at position %d.', $i)); } if (!is_array($value) || !array_key_exists($currentKey, $value)) { return $default; } $value = $value[$currentKey]; $currentKey = null; } else { if (null === $currentKey) { throw new \InvalidArgumentException(sprintf('Malformed path. Unexpected "%s" at position %d.', $char, $i)); } $currentKey .= $char; } } if (null !== $currentKey) { throw new \InvalidArgumentException(sprintf('Malformed path. Path must end with "]".')); } return $value; } /** * Sets a parameter by name. * * @param string $key The key * @param mixed $value The value * * @api */ public function set($key, $value) { $this->parameters[$key] = $value; } /** * Returns true if the parameter is defined. * * @param string $key The key * * @return Boolean true if the parameter exists, false otherwise * * @api */ public function has($key) { return array_key_exists($key, $this->parameters); } /** * Removes a parameter. * * @param string $key The key * * @api */ public function remove($key) { unset($this->parameters[$key]); } /** * Returns the alphabetic characters of the parameter value. * * @param string $key The parameter key * @param mixed $default The default value if the parameter key does not exist * @param boolean $deep If true, a path like foo[bar] will find deeper items * * @return string The filtered value * * @api */ public function getAlpha($key, $default = '', $deep = false) { return preg_replace('/[^[:alpha:]]/', '', $this->get($key, $default, $deep)); } /** * Returns the alphabetic characters and digits of the parameter value. * * @param string $key The parameter key * @param mixed $default The default value if the parameter key does not exist * @param boolean $deep If true, a path like foo[bar] will find deeper items * * @return string The filtered value * * @api */ public function getAlnum($key, $default = '', $deep = false) { return preg_replace('/[^[:alnum:]]/', '', $this->get($key, $default, $deep)); } /** * Returns the digits of the parameter value. * * @param string $key The parameter key * @param mixed $default The default value if the parameter key does not exist * @param boolean $deep If true, a path like foo[bar] will find deeper items * * @return string The filtered value * * @api */ public function getDigits($key, $default = '', $deep = false) { // we need to remove - and + because they're allowed in the filter return str_replace(array('-', '+'), '', $this->filter($key, $default, $deep, FILTER_SANITIZE_NUMBER_INT)); } /** * Returns the parameter value converted to integer. * * @param string $key The parameter key * @param mixed $default The default value if the parameter key does not exist * @param boolean $deep If true, a path like foo[bar] will find deeper items * * @return integer The filtered value * * @api */ public function getInt($key, $default = 0, $deep = false) { return (int) $this->get($key, $default, $deep); } /** * Filter key. * * @param string $key Key. * @param mixed $default Default = null. * @param boolean $deep Default = false. * @param integer $filter FILTER_* constant. * @param mixed $options Filter options. * * @see http://php.net/manual/en/function.filter-var.php * * @return mixed */ public function filter($key, $default = null, $deep = false, $filter = FILTER_DEFAULT, $options = array()) { $value = $this->get($key, $default, $deep); // Always turn $options into an array - this allows filter_var option shortcuts. if (!is_array($options) && $options) { $options = array('flags' => $options); } // Add a convenience check for arrays. if (is_array($value) && !isset($options['flags'])) { $options['flags'] = FILTER_REQUIRE_ARRAY; } return filter_var($value, $filter, $options); } /** * Returns an iterator for parameters. * * @return \ArrayIterator An \ArrayIterator instance */ public function getIterator() { return new \ArrayIterator($this->parameters); } /** * Returns the number of parameters. * * @return int The number of parameters */ public function count() { return count($this->parameters); } } $test = new ParameterBag(array('test' => 'test%2B12')); echo $test->get('test');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  (null)
number of ops:  10
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'parameterbag'
  295     1        NEW                                              $1      'ParameterBag'
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
  297     5        INIT_METHOD_CALL                                         !0, 'get'
          6        SEND_VAL_EX                                              'test'
          7        DO_FCALL                                      0  $4      
          8        ECHO                                                     $4
          9      > RETURN                                                   1

Class ParameterBag:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  __construct
number of ops:  4
compiled vars:  !0 = $parameters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV_INIT                                        !0      <array>
   27     1        ASSIGN_OBJ                                               'parameters'
          2        OP_DATA                                                  !0
   28     3      > RETURN                                                   null

End of function __construct

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

End of function all

Function keys:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  keys
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   51     0  E >   INIT_FCALL                                               'array_keys'
          1        FETCH_OBJ_R                                      ~0      'parameters'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   52     5*     > RETURN                                                   null

End of function keys

Function replace:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  replace
number of ops:  4
compiled vars:  !0 = $parameters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   61     0  E >   RECV_INIT                                        !0      <array>
   63     1        ASSIGN_OBJ                                               'parameters'
          2        OP_DATA                                                  !0
   64     3      > RETURN                                                   null

End of function replace

Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  add
number of ops:  9
compiled vars:  !0 = $parameters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   73     0  E >   RECV_INIT                                        !0      <array>
   75     1        INIT_FCALL                                               'array_replace'
          2        FETCH_OBJ_R                                      ~2      'parameters'
          3        SEND_VAL                                                 ~2
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN_OBJ                                               'parameters'
          7        OP_DATA                                                  $3
   76     8      > RETURN                                                   null

End of function add

Function get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 33
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 94
Branch analysis from position: 94
2 jumps found. (Code = 44) Position 1 = 96, Position 2 = 41
Branch analysis from position: 96
2 jumps found. (Code = 43) Position 1 = 98, Position 2 = 105
Branch analysis from position: 98
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 105
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 57
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 55
Branch analysis from position: 47
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 55
1 jumps found. (Code = 42) Position 1 = 93
Branch analysis from position: 93
2 jumps found. (Code = 44) Position 1 = 96, Position 2 = 41
Branch analysis from position: 96
Branch analysis from position: 41
Branch analysis from position: 57
2 jumps found. (Code = 43) Position 1 = 59, Position 2 = 81
Branch analysis from position: 59
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 69
Branch analysis from position: 61
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 69
2 jumps found. (Code = 47) Position 1 = 72, Position 2 = 75
Branch analysis from position: 72
2 jumps found. (Code = 43) Position 1 = 76, Position 2 = 77
Branch analysis from position: 76
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 77
1 jumps found. (Code = 42) Position 1 = 93
Branch analysis from position: 93
Branch analysis from position: 75
Branch analysis from position: 81
2 jumps found. (Code = 43) Position 1 = 83, Position 2 = 92
Branch analysis from position: 83
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 92
2 jumps found. (Code = 44) Position 1 = 96, Position 2 = 41
Branch analysis from position: 96
Branch analysis from position: 41
Branch analysis from position: 12
filename:       /in/MFojl
function name:  get
number of ops:  107
compiled vars:  !0 = $path, !1 = $default, !2 = $deep, !3 = $pos, !4 = $root, !5 = $value, !6 = $currentKey, !7 = $i, !8 = $c, !9 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   91     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      <false>
   93     3        BOOL_NOT                                         ~10     !2
          4      > JMPNZ_EX                                         ~10     ~10, ->12
          5    >   INIT_FCALL                                               'strpos'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 '%5B'
          8        DO_ICALL                                         $11     
          9        ASSIGN                                           ~12     !3, $11
         10        TYPE_CHECK                                    4  ~13     ~12
         11        BOOL                                             ~10     ~13
         12    > > JMPZ                                                     ~10, ->22
   94    13    >   FETCH_OBJ_R                                      ~14     'parameters'
         14        ARRAY_KEY_EXISTS                                         !0, ~14
         15      > JMPZ                                                     ~15, ->20
         16    >   FETCH_OBJ_R                                      ~16     'parameters'
         17        FETCH_DIM_R                                      ~17     ~16, !0
         18        QM_ASSIGN                                        ~18     ~17
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~18     !1
         21    > > RETURN                                                   ~18
   97    22    >   INIT_FCALL                                               'substr'
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 0
         25        SEND_VAR                                                 !3
         26        DO_ICALL                                         $19     
         27        ASSIGN                                                   !4, $19
   98    28        FETCH_OBJ_R                                      ~21     'parameters'
         29        ARRAY_KEY_EXISTS                                 ~22     !4, ~21
         30        BOOL_NOT                                         ~23     ~22
         31      > JMPZ                                                     ~23, ->33
   99    32    > > RETURN                                                   !1
  102    33    >   FETCH_OBJ_R                                      ~24     'parameters'
         34        FETCH_DIM_R                                      ~25     ~24, !4
         35        ASSIGN                                                   !5, ~25
  103    36        ASSIGN                                                   !6, null
  104    37        ASSIGN                                                   !7, !3
         38        STRLEN                                           ~29     !0
         39        ASSIGN                                                   !8, ~29
         40      > JMP                                                      ->94
  105    41    >   FETCH_DIM_R                                      ~31     !0, !7
         42        ASSIGN                                                   !9, ~31
  107    43        IS_IDENTICAL                                             !9, '%5B'
         44      > JMPZ                                                     ~33, ->57
  108    45    >   TYPE_CHECK                                  1020          !6
         46      > JMPZ                                                     ~34, ->55
  109    47    >   NEW                                              $35     'InvalidArgumentException'
         48        INIT_FCALL                                               'sprintf'
         49        SEND_VAL                                                 'Malformed+path.+Unexpected+%22%5B%22+at+position+%25d.'
         50        SEND_VAR                                                 !7
         51        DO_ICALL                                         $36     
         52        SEND_VAR_NO_REF_EX                                       $36
         53        DO_FCALL                                      0          
         54      > THROW                                         0          $35
  112    55    >   ASSIGN                                                   !6, ''
         56      > JMP                                                      ->93
  113    57    >   IS_IDENTICAL                                             !9, '%5D'
         58      > JMPZ                                                     ~39, ->81
  114    59    >   TYPE_CHECK                                    2          !6
         60      > JMPZ                                                     ~40, ->69
  115    61    >   NEW                                              $41     'InvalidArgumentException'
         62        INIT_FCALL                                               'sprintf'
         63        SEND_VAL                                                 'Malformed+path.+Unexpected+%22%5D%22+at+position+%25d.'
         64        SEND_VAR                                                 !7
         65        DO_ICALL                                         $42     
         66        SEND_VAR_NO_REF_EX                                       $42
         67        DO_FCALL                                      0          
         68      > THROW                                         0          $41
  118    69    >   TYPE_CHECK                                  128  ~44     !5
         70        BOOL_NOT                                         ~45     ~44
         71      > JMPNZ_EX                                         ~45     ~45, ->75
         72    >   ARRAY_KEY_EXISTS                                 ~46     !6, !5
         73        BOOL_NOT                                         ~47     ~46
         74        BOOL                                             ~45     ~47
         75    > > JMPZ                                                     ~45, ->77
  119    76    > > RETURN                                                   !1
  122    77    >   FETCH_DIM_R                                      ~48     !5, !6
         78        ASSIGN                                                   !5, ~48
  123    79        ASSIGN                                                   !6, null
         80      > JMP                                                      ->93
  125    81    >   TYPE_CHECK                                    2          !6
         82      > JMPZ                                                     ~51, ->92
  126    83    >   NEW                                              $52     'InvalidArgumentException'
         84        INIT_FCALL                                               'sprintf'
         85        SEND_VAL                                                 'Malformed+path.+Unexpected+%22%25s%22+at+position+%25d.'
         86        SEND_VAR                                                 !9
         87        SEND_VAR                                                 !7
         88        DO_ICALL                                         $53     
         89        SEND_VAR_NO_REF_EX                                       $53
         90        DO_FCALL                                      0          
         91      > THROW                                         0          $52
  129    92    >   ASSIGN_OP                                     8          !6, !9
  104    93    >   PRE_INC                                                  !7
         94    >   IS_SMALLER                                               !7, !8
         95      > JMPNZ                                                    ~57, ->41
  133    96    >   TYPE_CHECK                                  1020          !6
         97      > JMPZ                                                     ~58, ->105
  134    98    >   NEW                                              $59     'InvalidArgumentException'
         99        INIT_FCALL                                               'sprintf'
        100        SEND_VAL                                                 'Malformed+path.+Path+must+end+with+%22%5D%22.'
        101        DO_ICALL                                         $60     
        102        SEND_VAR_NO_REF_EX                                       $60
        103        DO_FCALL                                      0          
        104      > THROW                                         0          $59
  137   105    > > RETURN                                                   !5
  138   106*     > RETURN                                                   null

End of function get

Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  set
number of ops:  6
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  148     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  150     2        FETCH_OBJ_W                                      $2      'parameters'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
  151     5      > RETURN                                                   null

End of function set

Function has:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  has
number of ops:  5
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  162     0  E >   RECV                                             !0      
  164     1        FETCH_OBJ_R                                      ~1      'parameters'
          2        ARRAY_KEY_EXISTS                                 ~2      !0, ~1
          3      > RETURN                                                   ~2
  165     4*     > RETURN                                                   null

End of function has

Function remove:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  remove
number of ops:  4
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  174     0  E >   RECV                                             !0      
  176     1        FETCH_OBJ_UNSET                                  $1      'parameters'
          2        UNSET_DIM                                                $1, !0
  177     3      > RETURN                                                   null

End of function remove

Function getalpha:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  getAlpha
number of ops:  15
compiled vars:  !0 = $key, !1 = $default, !2 = $deep
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  190     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      ''
          2        RECV_INIT                                        !2      <false>
  192     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAL                                                 '%2F%5B%5E%5B%3Aalpha%3A%5D%5D%2F'
          5        SEND_VAL                                                 ''
          6        INIT_METHOD_CALL                                         'get'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !1
          9        SEND_VAR_EX                                              !2
         10        DO_FCALL                                      0  $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                         $4      
         13      > RETURN                                                   $4
  193    14*     > RETURN                                                   null

End of function getalpha

Function getalnum:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  getAlnum
number of ops:  15
compiled vars:  !0 = $key, !1 = $default, !2 = $deep
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  206     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      ''
          2        RECV_INIT                                        !2      <false>
  208     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAL                                                 '%2F%5B%5E%5B%3Aalnum%3A%5D%5D%2F'
          5        SEND_VAL                                                 ''
          6        INIT_METHOD_CALL                                         'get'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !1
          9        SEND_VAR_EX                                              !2
         10        DO_FCALL                                      0  $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                         $4      
         13      > RETURN                                                   $4
  209    14*     > RETURN                                                   null

End of function getalnum

Function getdigits:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  getDigits
number of ops:  16
compiled vars:  !0 = $key, !1 = $default, !2 = $deep
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  222     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      ''
          2        RECV_INIT                                        !2      <false>
  225     3        INIT_FCALL                                               'str_replace'
          4        SEND_VAL                                                 <array>
          5        SEND_VAL                                                 ''
          6        INIT_METHOD_CALL                                         'filter'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !1
          9        SEND_VAR_EX                                              !2
         10        SEND_VAL_EX                                              519
         11        DO_FCALL                                      0  $3      
         12        SEND_VAR                                                 $3
         13        DO_ICALL                                         $4      
         14      > RETURN                                                   $4
  226    15*     > RETURN                                                   null

End of function getdigits

Function getint:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  getInt
number of ops:  11
compiled vars:  !0 = $key, !1 = $default, !2 = $deep
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  239     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      0
          2        RECV_INIT                                        !2      <false>
  241     3        INIT_METHOD_CALL                                         'get'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        SEND_VAR_EX                                              !2
          7        DO_FCALL                                      0  $3      
          8        CAST                                          4  ~4      $3
          9      > RETURN                                                   ~4
  242    10*     > RETURN                                                   null

End of function getint

Function filter:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 23
Branch analysis from position: 18
Branch analysis from position: 15
filename:       /in/MFojl
function name:  filter
number of ops:  33
compiled vars:  !0 = $key, !1 = $default, !2 = $deep, !3 = $filter, !4 = $options, !5 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  257     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      <false>
          3        RECV_INIT                                        !3      <const ast>
          4        RECV_INIT                                        !4      <array>
  259     5        INIT_METHOD_CALL                                         'get'
          6        SEND_VAR_EX                                              !0
          7        SEND_VAR_EX                                              !1
          8        SEND_VAR_EX                                              !2
          9        DO_FCALL                                      0  $6      
         10        ASSIGN                                                   !5, $6
  262    11        TYPE_CHECK                                  128  ~8      !4
         12        BOOL_NOT                                         ~9      ~8
         13      > JMPZ_EX                                          ~9      ~9, ->15
         14    >   BOOL                                             ~9      !4
         15    > > JMPZ                                                     ~9, ->18
  263    16    >   INIT_ARRAY                                       ~10     !4, 'flags'
         17        ASSIGN                                                   !4, ~10
  267    18    >   TYPE_CHECK                                  128  ~12     !5
         19      > JMPZ_EX                                          ~12     ~12, ->23
         20    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~13     !4, 'flags'
         21        BOOL_NOT                                         ~14     ~13
         22        BOOL                                             ~12     ~14
         23    > > JMPZ                                                     ~12, ->26
  268    24    >   ASSIGN_DIM                                               !4, 'flags'
         25        OP_DATA                                                  16777216
  271    26    >   INIT_FCALL                                               'filter_var'
         27        SEND_VAR                                                 !5
         28        SEND_VAR                                                 !3
         29        SEND_VAR                                                 !4
         30        DO_ICALL                                         $16     
         31      > RETURN                                                   $16
  272    32*     > RETURN                                                   null

End of function filter

Function getiterator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFojl
function name:  getIterator
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  281     0  E >   NEW                                              $0      'ArrayIterator'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $1      'parameters'
          3        SEND_FUNC_ARG                                            $1
          4        DO_FCALL                                      0          
          5      > RETURN                                                   $0
  282     6*     > RETURN                                                   null

End of function getiterator

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

End of function count

End of class ParameterBag.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.09 ms | 1424 KiB | 29 Q