3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Routing; /** * A Route describes a route and its parameters. * * @author Fabien Potencier <fabien@symfony.com> * @author Tobias Schultze <http://tobion.de> * * @api */ class Route implements \Serializable { /** * @var string */ private $path = '/'; /** * @var string */ private $host = ''; /** * @var array */ private $schemes = array(); /** * @var array */ private $methods = array(); /** * @var array */ private $defaults = array(); /** * @var array */ private $requirements = array(); /** * @var array */ private $options = array(); /** * @var null|CompiledRoute */ private $compiled; private $condition; /** * Constructor. * * Available options: * * * compiler_class: A class name able to compile this route instance (RouteCompiler by default) * * @param string $path The path pattern to match * @param array $defaults An array of default parameter values * @param array $requirements An array of requirements for parameters (regexes) * @param array $options An array of options * @param string $host The host pattern to match * @param string|array $schemes A required URI scheme or an array of restricted schemes * @param string|array $methods A required HTTP method or an array of restricted methods * @param string $condition A condition that should evaluate to true for the route to match * * @api */ public function __construct($path, array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array(), $condition = null) { $this->setPath($path); $this->setDefaults($defaults); $this->setRequirements($requirements); $this->setOptions($options); $this->setHost($host); // The conditions make sure that an initial empty $schemes/$methods does not override the corresponding requirement. // They can be removed when the BC layer is removed. if ($schemes) { $this->setSchemes($schemes); } if ($methods) { $this->setMethods($methods); } $this->setCondition($condition); } public function serialize() { return serialize(array( 'path' => $this->path, 'host' => $this->host, 'defaults' => $this->defaults, 'requirements' => $this->requirements, 'options' => $this->options, 'schemes' => $this->schemes, 'methods' => $this->methods, 'condition' => $this->condition, )); } public function unserialize($data) { $data = unserialize($data); $this->path = $data['path']; $this->host = $data['host']; $this->defaults = $data['defaults']; $this->requirements = $data['requirements']; $this->options = $data['options']; $this->schemes = $data['schemes']; $this->methods = $data['methods']; $this->condition = $data['condition']; } /** * Returns the pattern for the path. * * @return string The pattern * * @deprecated Deprecated in 2.2, to be removed in 3.0. Use getPath instead. */ public function getPattern() { return $this->path; } /** * Sets the pattern for the path. * * This method implements a fluent interface. * * @param string $pattern The path pattern * * @return Route The current Route instance * * @deprecated Deprecated in 2.2, to be removed in 3.0. Use setPath instead. */ public function setPattern($pattern) { return $this->setPath($pattern); } /** * Returns the pattern for the path. * * @return string The path pattern */ public function getPath() { return $this->path; } /** * Sets the pattern for the path. * * This method implements a fluent interface. * * @param string $pattern The path pattern * * @return Route The current Route instance */ public function setPath($pattern) { // A pattern must start with a slash and must not have multiple slashes at the beginning because the // generated path for this route would be confused with a network path, e.g. '//domain.com/path'. $this->path = '/'.ltrim(trim($pattern), '/'); $this->compiled = null; return $this; } /** * Returns the pattern for the host. * * @return string The host pattern */ public function getHost() { return $this->host; } /** * Sets the pattern for the host. * * This method implements a fluent interface. * * @param string $pattern The host pattern * * @return Route The current Route instance */ public function setHost($pattern) { $this->host = (string) $pattern; $this->compiled = null; return $this; } /** * Returns the lowercased schemes this route is restricted to. * So an empty array means that any scheme is allowed. * * @return array The schemes */ public function getSchemes() { return $this->schemes; } /** * Sets the schemes (e.g. 'https') this route is restricted to. * So an empty array means that any scheme is allowed. * * This method implements a fluent interface. * * @param string|array $schemes The scheme or an array of schemes * * @return Route The current Route instance */ public function setSchemes($schemes) { $this->schemes = array_map('strtolower', (array) $schemes); // this is to keep BC and will be removed in a future version if ($this->schemes) { $this->requirements['_scheme'] = implode('|', $this->schemes); } else { unset($this->requirements['_scheme']); } $this->compiled = null; return $this; } /** * Checks if a scheme requirement has been set. * * @param string $scheme * * @return bool true if the scheme requirement exists, otherwise false */ public function hasScheme($scheme) { $scheme = strtolower($scheme); foreach ($this->schemes as $requiredScheme) { if ($scheme === $requiredScheme) { return true; } } return false; } /** * Returns the uppercased HTTP methods this route is restricted to. * So an empty array means that any method is allowed. * * @return array The schemes */ public function getMethods() { return $this->methods; } /** * Sets the HTTP methods (e.g. 'POST') this route is restricted to. * So an empty array means that any method is allowed. * * This method implements a fluent interface. * * @param string|array $methods The method or an array of methods * * @return Route The current Route instance */ public function setMethods($methods) { $this->methods = array_map('strtoupper', (array) $methods); // this is to keep BC and will be removed in a future version if ($this->methods) { $this->requirements['_method'] = implode('|', $this->methods); } else { unset($this->requirements['_method']); } $this->compiled = null; return $this; } /** * Returns the options. * * @return array The options */ public function getOptions() { return $this->options; } /** * Sets the options. * * This method implements a fluent interface. * * @param array $options The options * * @return Route The current Route instance */ public function setOptions(array $options) { $this->options = array( 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', ); return $this->addOptions($options); } /** * Adds options. * * This method implements a fluent interface. * * @param array $options The options * * @return Route The current Route instance */ public function addOptions(array $options) { foreach ($options as $name => $option) { $this->options[$name] = $option; } $this->compiled = null; return $this; } /** * Sets an option value. * * This method implements a fluent interface. * * @param string $name An option name * @param mixed $value The option value * * @return Route The current Route instance * * @api */ public function setOption($name, $value) { $this->options[$name] = $value; $this->compiled = null; return $this; } /** * Get an option value. * * @param string $name An option name * * @return mixed The option value or null when not given */ public function getOption($name) { return isset($this->options[$name]) ? $this->options[$name] : null; } /** * Checks if an option has been set * * @param string $name An option name * * @return bool true if the option is set, false otherwise */ public function hasOption($name) { return array_key_exists($name, $this->options); } /** * Returns the defaults. * * @return array The defaults */ public function getDefaults() { return $this->defaults; } /** * Sets the defaults. * * This method implements a fluent interface. * * @param array $defaults The defaults * * @return Route The current Route instance */ public function setDefaults(array $defaults) { $this->defaults = array(); return $this->addDefaults($defaults); } /** * Adds defaults. * * This method implements a fluent interface. * * @param array $defaults The defaults * * @return Route The current Route instance */ public function addDefaults(array $defaults) { foreach ($defaults as $name => $default) { $this->defaults[$name] = $default; } $this->compiled = null; return $this; } /** * Gets a default value. * * @param string $name A variable name * * @return mixed The default value or null when not given */ public function getDefault($name) { return isset($this->defaults[$name]) ? $this->defaults[$name] : null; } /** * Checks if a default value is set for the given variable. * * @param string $name A variable name * * @return bool true if the default value is set, false otherwise */ public function hasDefault($name) { return array_key_exists($name, $this->defaults); } /** * Sets a default value. * * @param string $name A variable name * @param mixed $default The default value * * @return Route The current Route instance * * @api */ public function setDefault($name, $default) { $this->defaults[$name] = $default; $this->compiled = null; return $this; } /** * Returns the requirements. * * @return array The requirements */ public function getRequirements() { return $this->requirements; } /** * Sets the requirements. * * This method implements a fluent interface. * * @param array $requirements The requirements * * @return Route The current Route instance */ public function setRequirements(array $requirements) { $this->requirements = array(); return $this->addRequirements($requirements); } /** * Adds requirements. * * This method implements a fluent interface. * * @param array $requirements The requirements * * @return Route The current Route instance */ public function addRequirements(array $requirements) { foreach ($requirements as $key => $regex) { $this->requirements[$key] = $this->sanitizeRequirement($key, $regex); } $this->compiled = null; return $this; } /** * Returns the requirement for the given key. * * @param string $key The key * * @return string|null The regex or null when not given */ public function getRequirement($key) { return isset($this->requirements[$key]) ? $this->requirements[$key] : null; } /** * Checks if a requirement is set for the given key. * * @param string $key A variable name * * @return bool true if a requirement is specified, false otherwise */ public function hasRequirement($key) { return array_key_exists($key, $this->requirements); } /** * Sets a requirement for the given key. * * @param string $key The key * @param string $regex The regex * * @return Route The current Route instance * * @api */ public function setRequirement($key, $regex) { $this->requirements[$key] = $this->sanitizeRequirement($key, $regex); $this->compiled = null; return $this; } /** * Returns the condition. * * @return string The condition */ public function getCondition() { return $this->condition; } /** * Sets the condition. * * This method implements a fluent interface. * * @param string $condition The condition * * @return Route The current Route instance */ public function setCondition($condition) { $this->condition = (string) $condition; $this->compiled = null; return $this; } /** * Compiles the route. * * @return CompiledRoute A CompiledRoute instance * * @throws \LogicException If the Route cannot be compiled because the * path or host pattern is invalid * * @see RouteCompiler which is responsible for the compilation process */ public function compile() { if (null !== $this->compiled) { return $this->compiled; } $class = $this->getOption('compiler_class'); return $this->compiled = $class::compile($this); } private function sanitizeRequirement($key, $regex) { if (!is_string($regex)) { throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" must be a string.', $key)); } if ('' !== $regex && '^' === $regex[0]) { $regex = (string) substr($regex, 1); // returns false for a single character } if ('$' === substr($regex, -1)) { $regex = substr($regex, 0, -1); } if ('' === $regex) { throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" cannot be empty.', $key)); } // this is to keep BC and will be removed in a future version if ('_scheme' === $key) { $this->setSchemes(explode('|', $regex)); } elseif ('_method' === $key) { $this->setMethods(explode('|', $regex)); } return $regex; } } $r = new Route('/d', array('f'=>'g')); var_dump($s = serialize($r));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lnt1
function name:  (null)
number of ops:  14
compiled vars:  !0 = $r, !1 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   DECLARE_CLASS                                            'symfony%5Ccomponent%5Crouting%5Croute'
  649     1        NEW                                              $2      'Symfony%5CComponent%5CRouting%5CRoute'
          2        SEND_VAL_EX                                              '%2Fd'
          3        SEND_VAL_EX                                              <array>
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
  650     6        INIT_NS_FCALL_BY_NAME                                    'Symfony%5CComponent%5CRouting%5Cvar_dump'
          7        INIT_NS_FCALL_BY_NAME                                    'Symfony%5CComponent%5CRouting%5Cserialize'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $5      
         10        ASSIGN                                           ~6      !1, $5
         11        SEND_VAL_EX                                              ~6
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Class Symfony\Component\Routing\Route:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 27
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 31
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
Branch analysis from position: 27
filename:       /in/2lnt1
function name:  __construct
number of ops:  35
compiled vars:  !0 = $path, !1 = $defaults, !2 = $requirements, !3 = $options, !4 = $host, !5 = $schemes, !6 = $methods, !7 = $condition
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   84     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
          2        RECV_INIT                                        !2      <array>
          3        RECV_INIT                                        !3      <array>
          4        RECV_INIT                                        !4      ''
          5        RECV_INIT                                        !5      <array>
          6        RECV_INIT                                        !6      <array>
          7        RECV_INIT                                        !7      null
   86     8        INIT_METHOD_CALL                                         'setPath'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
   87    11        INIT_METHOD_CALL                                         'setDefaults'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
   88    14        INIT_METHOD_CALL                                         'setRequirements'
         15        SEND_VAR_EX                                              !2
         16        DO_FCALL                                      0          
   89    17        INIT_METHOD_CALL                                         'setOptions'
         18        SEND_VAR_EX                                              !3
         19        DO_FCALL                                      0          
   90    20        INIT_METHOD_CALL                                         'setHost'
         21        SEND_VAR_EX                                              !4
         22        DO_FCALL                                      0          
   93    23      > JMPZ                                                     !5, ->27
   94    24    >   INIT_METHOD_CALL                                         'setSchemes'
         25        SEND_VAR_EX                                              !5
         26        DO_FCALL                                      0          
   96    27    > > JMPZ                                                     !6, ->31
   97    28    >   INIT_METHOD_CALL                                         'setMethods'
         29        SEND_VAR_EX                                              !6
         30        DO_FCALL                                      0          
   99    31    >   INIT_METHOD_CALL                                         'setCondition'
         32        SEND_VAR_EX                                              !7
         33        DO_FCALL                                      0          
  100    34      > RETURN                                                   null

End of function __construct

Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lnt1
function name:  serialize
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  104     0  E >   INIT_NS_FCALL_BY_NAME                                    'Symfony%5CComponent%5CRouting%5Cserialize'
  105     1        FETCH_OBJ_R                                      ~0      'path'
          2        INIT_ARRAY                                       ~1      ~0, 'path'
  106     3        FETCH_OBJ_R                                      ~2      'host'
          4        ADD_ARRAY_ELEMENT                                ~1      ~2, 'host'
  107     5        FETCH_OBJ_R                                      ~3      'defaults'
          6        ADD_ARRAY_ELEMENT                                ~1      ~3, 'defaults'
  108     7        FETCH_OBJ_R                                      ~4      'requirements'
          8        ADD_ARRAY_ELEMENT                                ~1      ~4, 'requirements'
  109     9        FETCH_OBJ_R                                      ~5      'options'
         10        ADD_ARRAY_ELEMENT                                ~1      ~5, 'options'
  110    11        FETCH_OBJ_R                                      ~6      'schemes'
         12        ADD_ARRAY_ELEMENT                                ~1      ~6, 'schemes'
  111    13        FETCH_OBJ_R                                      ~7      'methods'
         14        ADD_ARRAY_ELEMENT                                ~1      ~7, 'methods'
  112    15        FETCH_OBJ_R                                      ~8      'condition'
         16        ADD_ARRAY_ELEMENT                                ~1      ~8, 'condition'
         17        SEND_VAL_EX                                              ~1
         18        DO_FCALL                                      0  $9      
         19      > RETURN                                                   $9
  114    20*     > RETURN                                                   null

End of function serialize

Function unserialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lnt1
function name:  unserialize
number of ops:  30
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  116     0  E >   RECV                                             !0      
  118     1        INIT_NS_FCALL_BY_NAME                                    'Symfony%5CComponent%5CRouting%5Cunserialize'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
  119     5        FETCH_DIM_R                                      ~4      !0, 'path'
          6        ASSIGN_OBJ                                               'path'
          7        OP_DATA                                                  ~4
  120     8        FETCH_DIM_R                                      ~6      !0, 'host'
          9        ASSIGN_OBJ                                               'host'
         10        OP_DATA                                                  ~6
  121    11        FETCH_DIM_R                                      ~8      !0, 'defaults'
         12        ASSIGN_OBJ                                               'defaults'
         13        OP_DATA                                                  ~8
  122    14        FETCH_DIM_R                                      ~10     !0, 'requirements'
         15        ASSIGN_OBJ                                               'requirements'
         16        OP_DATA                                                  ~10
  123    17        FETCH_DIM_R                                      ~12     !0, 'options'
         18        ASSIGN_OBJ                                               'options'
         19        OP_DATA                                                  ~12
  124    20        FETCH_DIM_R                                      ~14     !0, 'schemes'
         21        ASSIGN_OBJ                                               'schemes'
         22        OP_DATA                                                  ~14
  125    23        FETCH_DIM_R                                      ~16     !0, 'methods'
         24        ASSIGN_OBJ                                               'methods'
         25        OP_DATA                                                  ~16
  126    26        FETCH_DIM_R                                      ~18     !0, 'condition'
         27        ASSIGN_OBJ                                               'condition'
         28        OP_DATA                                                  ~18
  127    29      > RETURN                                                   null

End of function unserialize

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

End of function getpattern

Function setpattern:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lnt1
function name:  setPattern
number of ops:  6
compiled vars:  !0 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  152     0  E >   RECV                                             !0      
  154     1        INIT_METHOD_CALL                                         'setPath'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
  155     5*     > RETURN                                                   null

End of function setpattern

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

End of function getpath

Function setpath:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lnt1
function name:  setPath
number of ops:  16
compiled vars:  !0 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  176     0  E >   RECV                                             !0      
  180     1        INIT_NS_FCALL_BY_NAME                                    'Symfony%5CComponent%5CRouting%5Cltrim'
          2        INIT_NS_FCALL_BY_NAME                                    'Symfony%5CComponent%5CRouting%5Ctrim'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR_NO_REF_EX                                       $2
          6        SEND_VAL_EX                                              '%2F'
          7        DO_FCALL                                      0  $3      
          8        CONCAT                                           ~4      '%2F', $3
          9        ASSIGN_OBJ                                               'path'
         10        OP_DATA                                                  ~4
  181    11        ASSIGN_OBJ                                               'compiled'
         12        OP_DATA                                                  null
  183    13        FETCH_THIS                                       ~6      
         14      > RETURN                                                   ~6
  184    15*     > RETURN                                                   null

End of function setpath

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

End of function gethost

Function sethost:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lnt1
function name:  setHost
number of ops:  9
compiled vars:  !0 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  205     0  E >   RECV                                             !0      
  207     1        CAST                                          6  ~2      !0
          2        ASSIGN_OBJ                                               'host'
          3        OP_DATA                                                  ~2
  208     4        ASSIGN_OBJ                                               'compiled'
          5        OP_DATA                                                  null
  210     6        FETCH_THIS                                       ~4      
          7      > RETURN                                                   ~4
  211     8*     > RETURN                                                   null

End of function sethost

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

End of function getschemes

Function setschemes:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lnt1
function name:  setSchemes
number of ops:  27
compiled vars:  !0 = $schemes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  234     0  E >   RECV                                             !0      
  236     1        INIT_NS_FCALL_BY_NAME                                    'Symfony%5CComponent%5CRouting%5Carray_map'
          2        SEND_VAL_EX                                              'strtolower'
          3        CAST                                          7  ~2      !0
          4        SEND_VAL_EX                                              ~2
          5        DO_FCALL                                      0  $3      
          6        ASSIGN_OBJ                                               'schemes'
          7        OP_DATA                                                  $3
  239     8        FETCH_OBJ_R                                      ~4      'schemes'
          9      > JMPZ                                                     ~4, ->20
  240    10    >   INIT_NS_FCALL_BY_NAME                                    'Symfony%5CComponent%5CRouting%5Cimplode'
         11        SEND_VAL_EX                                              '%7C'
         12        CHECK_FUNC_ARG                                           
         13        FETCH_OBJ_FUNC_ARG                               $7      'schemes'
         14        SEND_FUNC_ARG                                            $7
         15        DO_FCALL                                      0  $8      
         16        FETCH_OBJ_W                                      $5      'requirements'
         17        ASSIGN_DIM                                               $5, '_scheme'
         18        OP_DATA                                                  $8
         19      > JMP                                                      ->22
  242    20    >   FETCH_OBJ_UNSET                                  $9      'requirements'
         21        UNSET_DIM                                                $9, '_scheme'
  245    22    >   ASSIGN_OBJ                                               'compiled'
         23        OP_DATA                                                  null
  247    24        FETCH_THIS                                       ~11     
         25      > RETURN                                                   ~11
  248    26*     > RETURN                                                   null

End of function setschemes

Function hasscheme:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/2lnt1
function name:  hasScheme
number of ops:  16
compiled vars:  !0 = $scheme, !1 = $requiredScheme
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  257     0  E >   RECV                                             !0      
  259     1        INIT_NS_FCALL_BY_NAME                                    'Symfony%5CComponent%5CRouting%5Cstrtolower'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
  260     5        FETCH_OBJ_R                                      ~4      'schemes'
          6      > FE_RESET_R                                       $5      ~4, ->13
          7    > > FE_FETCH_R                                               $5, !1, ->13
  261     8    >   IS_IDENTICAL                                             !0, !1
          9      > JMPZ                                                     ~6, ->12
  262    10    >   FE_FREE                                                  $5
         11      > RETURN                                                   <true>
  260    12    > > JMP                                                      ->7
         13    >   FE_FREE                                                  $5
  266    14      > RETURN                                                   <false>
  267    15*     > RETURN                                                   null

End of function hasscheme

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

End of function getmethods

Function setmethods:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lnt1
function name:  setMethods
number of ops:  27
compiled vars:  !0 = $methods
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  290     0  E >   RECV                                             !0      
  292     1        INIT_NS_FCALL_BY_NAME                                    'Symfony%5CComponent%5CRouting%5Carray_map'
          2        SEND_VAL_EX                                              'strtoupper'
          3        CAST                                          7  ~2      !0
          4        SEND_VAL_EX                                              ~2
          5        DO_FCALL                                      0  $3      
          6        ASSIGN_OBJ                                               'methods'
          7        OP_DATA                                                  $3
  295     8        FETCH_OBJ_R                                      ~4      'methods'
          9      > JMPZ                                                     ~4, ->20
  296    10    >   INIT_NS_FCALL_BY_NAME                                    'Symfony%5CComponent%5CRouting%5Cimplode'
         11        SEND_VAL_EX                                              '%7C'
         12        CHECK_FUNC_ARG                                           
         13        FETCH_OBJ_FUNC_ARG                               $7      'methods'
         14        SEND_FUNC_ARG                                            $7
         15        DO_FCALL                                      0  $8      
         16        FETCH_OBJ_W                                      $5      'requirements'
         17        ASSIGN_DIM                                               $5, '_method'
         18        OP_DATA                                                  $8
         19      > JMP                                                      ->22
  298    20    >   FETCH_OBJ_UNSET                                  $9      'requirements'
         21        UNSET_DIM                                                $9, '_method'
  301    22    >   ASSIGN_OBJ                                               'compiled'
         23        OP_DATA                                                  null
  303    24        FETCH_THIS                                       ~11     
         25      > RETURN                                                   ~11
  304    26*     > RETURN                                                   null

End of function setmethods

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

End of function getoptions

Function setoptions:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lnt1
function name:  setOptions
number of ops:  8
compiled vars:  !0 = $options
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  325     0  E >   RECV                                             !0      
  327     1        ASSIGN_OBJ                                               'options'
  328     2        OP_DATA                                                  <array>
  331     3        INIT_METHOD_CALL                                         'addOptions'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $2      
          6      > RETURN                                                   $2
  332     7*     > RETURN                                                   null

End of function setoptions

Function addoptions:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 8
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/2lnt1
function name:  addOptions
number of ops:  14
compiled vars:  !0 = $options, !1 = $option, !2 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  343     0  E >   RECV                                             !0      
  345     1      > FE_RESET_R                                       $3      !0, ->8
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->8
          3    >   ASSIGN                                                   !2, ~4
  346     4        FETCH_OBJ_W                                      $6      'options'
          5        ASSIGN_DIM                                               $6, !2
          6        OP_DATA                                                  !1
  345     7      > JMP                                                      ->2
          8    >   FE_FREE                                                  $3
  348     9        ASSIGN_OBJ                                               'compiled'
         10        OP_DATA                                                  null
  350    11        FETCH_THIS                                       ~9      
         12      > RETURN                                                   ~9
  351    13*     > RETURN                                                   null

End of function addoptions

Function setoption:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lnt1
function name:  setOption
number of ops:  10
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  365     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  367     2        FETCH_OBJ_W                                      $2      'options'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
  368     5        ASSIGN_OBJ                                               'compiled'
          6        OP_DATA                                                  null
  370     7        FETCH_THIS                                       ~5      
          8      > RETURN                                                   ~5
  371     9*     > RETURN                                                   null

End of function setoption

Function getoption:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lnt1
function name:  getOption
number of ops:  11
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  380     0  E >   RECV                                             !0      
  382     1        FETCH_OBJ_IS                                     ~1      'options'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, !0
          3      > JMPZ                                                     ~2, ->8
          4    >   FETCH_OBJ_R                                      ~3      'options'
          5        FETCH_DIM_R                                      ~4      ~3, !0
          6        QM_ASSIGN                                        ~5      ~4
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~5      null
          9    > > RETURN                                                   ~5
  383    10*     > RETURN                                                   null

End of function getoption

Function hasoption:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lnt1
function name:  hasOption
number of ops:  9
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  392     0  E >   RECV                                             !0      
  394     1        INIT_NS_FCALL_BY_NAME                                    'Symfony%5CComponent%5CR

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
213.1 ms | 1432 KiB | 29 Q