3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * PHP URI Library * * A PHP library for working with URI's. Requires PHP 5.3.7 or later. Replaces * and extends PHP's parse_url() * * Originally inspired by P Guardiario's work. * * @author Nicholas Jordon * @link https://github.com/ProjectCleverWeb/PHP-URI * @copyright 2014 Nicholas Jordon - All Rights Reserved * @version 1.0.0 RC2 * @license http://opensource.org/licenses/MIT * @see http://en.wikipedia.org/wiki/URI_scheme */ namespace { class uri extends \uri\main {} } namespace uri { abstract class main { public $error; public $input; private $object; private $authority; private $domain; private $fqdn; private $fragment; private $host; private $protocol; private $pass; private $password; private $path; private $port; private $query; private $scheme; private $scheme_name; private $scheme_symbols; private $user; private $username; public function __construct($input) { $this->input = $input; $this->object = \uri\parser::parse($input); if (is_object($this->object)) { \uri\generate::authority($this->object); \uri\generate::aliases($this->object); $this->authority = &$this->object->authority; $this->domain = &$this->object->domain; $this->fqdn = &$this->object->fqdn; $this->fragment = &$this->object->fragment; $this->host = &$this->object->host; $this->protocol = &$this->object->protocol; $this->pass = &$this->object->pass; $this->password = &$this->object->password; $this->path = &$this->object->path; $this->port = &$this->object->port; $this->query = &$this->object->query; $this->scheme = &$this->object->scheme; $this->scheme_name = &$this->object->scheme_name; $this->scheme_symbols = &$this->object->scheme_symbols; $this->user = &$this->object->user; $this->username = &$this->object->username; } else { $this->error = 'Input could not be parsed as a URI'; } } public function __toString() { return \uri\generate::string($this->object); } public function __invoke() { return \uri\generate::string($this->object); } public function __get($name) { if (isset($this->object->$name)) { \uri\generate::scheme($this->object); \uri\generate::authority($this->object); return $this->object->$name; } else { $trace = debug_backtrace(); trigger_error( sprintf( 'Undefined property via %1$s::__get(): \'%2$s\' in %3$s on line %4$s', __NAMESPACE__.'\\'.__CLASS__, $name, $trace[0]['file'], $trace[0]['line'] ), E_USER_NOTICE ); return NULL; } } public function __set($name, $value) { if (\uri\modify::modify($this->object, 'replace', $name, $value)) { return $value; } else { $trace = debug_backtrace(); trigger_error( sprintf( 'Forbidden property via %1$s::__set(): \'%2$s\' in %3$s on line %4$s', __NAMESPACE__.'\\'.__CLASS__, $name, $trace[0]['file'], $trace[0]['line'] ), E_USER_NOTICE ); return NULL; } } public function __isset($name) { \uri\generate::scheme($this->object); \uri\generate::authority($this->object); return !empty($this->object->$name); } public function __unset($name) { if (isset($this->object->$name)) { $this->object->$name = ''; \uri\generate::scheme($this->object); \uri\generate::authority($this->object); return TRUE; } else { $trace = debug_backtrace(); trigger_error( sprintf( 'Undifined property via %1$s::__unset(): \'%2$s\' in %3$s on line %4$s', __NAMESPACE__.'\\'.__CLASS__, $name, $trace[0]['file'], $trace[0]['line'] ), E_USER_NOTICE ); } return FALSE; } public function str() { return \uri\generate::string($this->object); } public function to_string() { return \uri\generate::string($this->object); } public function p_str() { echo \uri\generate::string($this->object); } public function arr() { return (array) $this->object; } public function to_array() { return (array) $this->object; } public function path_info() { return \uri\generate::path_info($this->object); } public function query_arr() { return \uri\generate::query_array($this->object); } public function replace($section, $str) { return \uri\modify::modify($this->object, 'replace', $section, $str); } public function prepend($section, $str) { return \uri\modify::modify($this->object, 'prepend', $section, $str); } public function append($section, $str) { return \uri\modify::modify($this->object, 'append', $section, $str); } public function reset() { $this->__construct($this->input); } } class parser { const REGEX = '/^(([a-z]+)?(\:\/\/|\:|\/\/))?(?:([a-z0-9$_\.\+!\*\'\(\),;&=\-]+)(?:\:([a-z0-9$_\.\+!\*\'\(\),;&=\-]*))?@)?((?:\d{3}.\d{3}.\d{3}.\d{3})|(?:[a-z0-9\-_]+(?:\.[a-z0-9\-_]+)*))(?:\:([0-9]+))?((?:\:|\/)[a-z0-9\-_\/\.]+)?(?:\?([a-z0-9$_\.\+!\*\'\(\),;:@&=\-%]*))?(?:#([a-z0-9\-_]*))?/i'; public static function parse($uri) { if (!is_string($uri)) { return FALSE; } $parsed = self::regex_parse($uri); if (empty($parsed)) { return FALSE; } return (object) array( 'scheme' => $parsed[1], 'scheme_name' => $parsed[2], 'scheme_symbols' => $parsed[3], 'user' => $parsed[4], 'pass' => $parsed[5], 'host' => $parsed[6], 'port' => $parsed[7], 'path' => $parsed[8], 'query' => $parsed[9], 'fragment' => $parsed[10], ); } private static function regex_parse($uri) { preg_match_all(self::REGEX, $uri, $parsed, PREG_SET_ORDER); if (!isset($parsed[0][6])) { return FALSE; } return $parsed[0] + array_fill(0, 11, ''); } } class modify { public static function modify(&$object, $action, $section, $str) { settype($section, 'string'); $section = strtolower($section); if (is_callable(array('\\uri\\modify', $section))) { return call_user_func_array(array('\\uri\\modify', $section), array(&$object, $action, $str)); } else { return FALSE; } } public static function replace(&$object, $section, $str) { $object->$section = $str; } public static function prepend(&$object, $section, $str) { $object->$section = $str.$object->$section; } public static function append(&$object, $section, $str) { $object->$section = $object->$section.$str; } public static function scheme_name(&$object, $action, $str) { $org = $object->scheme_name; call_user_func_array(array('\\uri\\modify', $action), array(&$object, 'scheme_name', $str)); if (!preg_match('/\A[a-z]{1,10}\Z/', $object->scheme_name)) { $object->scheme_name = $org; return FALSE; } elseif (empty($object->scheme_symbols)) { $object->scheme_symbols = '://'; } return \uri\generate::string($object); } public static function scheme_symbols(&$object, $action, $str) { $org = $object->scheme_symbols; call_user_func_array(array('\\uri\\modify', $action), array(&$object, 'scheme_symbols', $str)); if (!preg_match('/\A(:)?([\/]{2,3})?\Z/', $object->scheme_symbols)) { $object->scheme_symbols = $org; return FALSE; } return \uri\generate::string($object); } public static function scheme(&$object, $action, $str) { $org = array($object->scheme, $object->scheme_name, $object->scheme_symbols); call_user_func_array(array('\\uri\\modify', $action), array(&$object, 'scheme', $str)); if (empty($object->scheme)) { $object->scheme = $object->scheme_name = $object->scheme_symbols = ''; } else { preg_match('/\A([a-z]{1,10})?(\:|:\/\/|\/\/|:\/\/\/)\Z/i', $object->scheme, $matches); if (empty($matches[1]) && empty($matches[2])) { $object->scheme = $org[0]; $object->scheme_name = $org[1]; $object->scheme_symbols = $org[2]; return FALSE; } else { $matches = $matches + array('', '', ''); $object->scheme = $matches[0]; $object->scheme_name = $matches[1]; $object->scheme_symbols = $matches[2]; } } return \uri\generate::string($object); } public static function protocol(&$object, $action, $str) { self::scheme($object, $action, $str); } public static function user(&$object, $action, $str) { $str = rawurlencode($str); call_user_func_array(array('\\uri\\modify', $action), array(&$object, 'user', $str)); return \uri\generate::string($object); } public static function username(&$object, $action, $str) { self::user($object, $action, $str); } public static function pass(&$object, $action, $str) { $str = rawurlencode($str); call_user_func_array(array('\\uri\\modify', $action), array(&$object, 'pass', $str)); return \uri\generate::string($object); } public static function password(&$object, $action, $str) { self::pass($object, $action, $str); } public static function host(&$object, $action, $str) { $org = $object->host; call_user_func_array(array('\\uri\\modify', $action), array(&$object, 'host', $str)); if ( ( !preg_match('/\A(([a-z0-9_]([a-z0-9\-_]+)?)\.)+[a-z0-9]([a-z0-9\-]+)?\Z/i', $object->host) && !preg_match('/\A([0-9]\.){3}[0-9]\Z/i', $object->host) ) || strlen($object->host) > 255 ) { $object->host = $org; return FALSE; } return \uri\generate::string($object); } public static function domain(&$object, $action, $str) { self::host($object, $action, $str); } public static function fqdn(&$object, $action, $str) { self::host($object, $action, $str); } public static function port(&$object, $action, $str) { $org = $object->port; if ($str[0] == ':') { $str = substr($str, 1); } call_user_func_array(array('\\uri\\modify', $action), array(&$object, 'port', $str)); if (!preg_match('/\A[0-9]{0,5}\Z/', $object->port)) { $object->port = $org; return FALSE; } return \uri\generate::string($object); } public static function path(&$object, $action, $str) { $str = str_replace(array('//','\\'), '/', $str); $path_arr = explode('/', $str); $safe_arr = array(); foreach ($path_arr as $path_part) { $safe_arr[] = rawurlencode($path_part); } $str = implode('/', $safe_arr); call_user_func_array(array('\\uri\\modify', $action), array(&$object, 'path', $str)); return \uri\generate::string($object); } public static function query(&$object, $action, $str) { if (is_array($str)) { $str = http_build_query($str, '', '&', PHP_QUERY_RFC3986); } elseif ($str[0] == '?') { $str = substr($str, 1); } call_user_func_array(array('\\uri\\modify', $action), array(&$object, 'query', $str)); return \uri\generate::string($object); } public static function fragment(&$object, $action, $str) { if ($str[0] == '#') { unset($str[0]); } $str = urlencode($str); call_user_func_array(array('\\uri\\modify', $action), array(&$object, 'fragment', $str)); return \uri\generate::string($object); } } class generate { public static function aliases(&$object) { $object->protocol = &$object->scheme; $object->username = &$object->user; $object->password = &$object->pass; $object->domain = &$object->host; $object->fqdn = &$object->host; } public static function scheme(&$object) { $object->scheme = $object->scheme_name.$object->scheme_symbols; } public static function authority(&$object) { $str_arr = array($object->user); if (empty($object->user) == FALSE && empty($object->pass)) { $str_arr[] = '@'; } elseif (!empty($object->user)) { $str_arr[] = ':'.$object->pass.'@'; } $str_arr[] = $object->host; if (!empty($object->port)) { $str_arr[] = ':'.$object->port; } $object->authority = implode('', $str_arr); } public static function string(&$object) { self::scheme($object); self::authority($object); $str_arr = array($object->scheme, $object->authority, $object->path); if (!empty($object->query)) { $str_arr[] = '?'.$object->query; } if (!empty($object->fragment)) { $str_arr[] = '#'.$object->fragment; } return implode('', $str_arr); } public static function path_info(&$object) { $defaults = array( 'dirname' => '', 'basename' => '', 'extension' => '', 'filename' => '', 'array' => array() ); $info = pathinfo($object->path) + $defaults; $info['array'] = array_values(array_filter(explode('/', $object->path))); ksort($info); return $info; } public static function query_array(&$object) { parse_str($object->query, $return); return $return; } } class query { } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   DECLARE_CLASS                                            'uri', 'uri%5Cmain'
   25     1        DECLARE_CLASS                                            'uri%5Cmain'
  447     2      > RETURN                                                   1

Class uri: [no user functions]
Class uri\main:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 105
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 107
Branch analysis from position: 107
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 105
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  __construct
number of ops:  108
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   RECV                                             !0      
   46     1        ASSIGN_OBJ                                               'input'
          2        OP_DATA                                                  !0
   47     3        INIT_STATIC_METHOD_CALL                                  'uri%5Cparser', 'parse'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $3      
          6        ASSIGN_OBJ                                               'object'
          7        OP_DATA                                                  $3
   49     8        INIT_NS_FCALL_BY_NAME                                    'uri%5Cis_object'
          9        CHECK_FUNC_ARG                                           
         10        FETCH_OBJ_FUNC_ARG                               $4      'object'
         11        SEND_FUNC_ARG                                            $4
         12        DO_FCALL                                      0  $5      
         13      > JMPZ                                                     $5, ->105
   50    14    >   INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'authority'
         15        CHECK_FUNC_ARG                                           
         16        FETCH_OBJ_FUNC_ARG                               $6      'object'
         17        SEND_FUNC_ARG                                            $6
         18        DO_FCALL                                      0          
   51    19        INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'aliases'
         20        CHECK_FUNC_ARG                                           
         21        FETCH_OBJ_FUNC_ARG                               $8      'object'
         22        SEND_FUNC_ARG                                            $8
         23        DO_FCALL                                      0          
   53    24        FETCH_OBJ_W                                      $11     'object'
         25        FETCH_OBJ_W                                      $12     $11, 'authority'
         26        MAKE_REF                                         $13     $12
         27        ASSIGN_OBJ_REF                                           'authority'
         28        OP_DATA                                                  $13
   54    29        FETCH_OBJ_W                                      $15     'object'
         30        FETCH_OBJ_W                                      $16     $15, 'domain'
         31        MAKE_REF                                         $17     $16
         32        ASSIGN_OBJ_REF                                           'domain'
         33        OP_DATA                                                  $17
   55    34        FETCH_OBJ_W                                      $19     'object'
         35        FETCH_OBJ_W                                      $20     $19, 'fqdn'
         36        MAKE_REF                                         $21     $20
         37        ASSIGN_OBJ_REF                                           'fqdn'
         38        OP_DATA                                                  $21
   56    39        FETCH_OBJ_W                                      $23     'object'
         40        FETCH_OBJ_W                                      $24     $23, 'fragment'
         41        MAKE_REF                                         $25     $24
         42        ASSIGN_OBJ_REF                                           'fragment'
         43        OP_DATA                                                  $25
   57    44        FETCH_OBJ_W                                      $27     'object'
         45        FETCH_OBJ_W                                      $28     $27, 'host'
         46        MAKE_REF                                         $29     $28
         47        ASSIGN_OBJ_REF                                           'host'
         48        OP_DATA                                                  $29
   58    49        FETCH_OBJ_W                                      $31     'object'
         50        FETCH_OBJ_W                                      $32     $31, 'protocol'
         51        MAKE_REF                                         $33     $32
         52        ASSIGN_OBJ_REF                                           'protocol'
         53        OP_DATA                                                  $33
   59    54        FETCH_OBJ_W                                      $35     'object'
         55        FETCH_OBJ_W                                      $36     $35, 'pass'
         56        MAKE_REF                                         $37     $36
         57        ASSIGN_OBJ_REF                                           'pass'
         58        OP_DATA                                                  $37
   60    59        FETCH_OBJ_W                                      $39     'object'
         60        FETCH_OBJ_W                                      $40     $39, 'password'
         61        MAKE_REF                                         $41     $40
         62        ASSIGN_OBJ_REF                                           'password'
         63        OP_DATA                                                  $41
   61    64        FETCH_OBJ_W                                      $43     'object'
         65        FETCH_OBJ_W                                      $44     $43, 'path'
         66        MAKE_REF                                         $45     $44
         67        ASSIGN_OBJ_REF                                           'path'
         68        OP_DATA                                                  $45
   62    69        FETCH_OBJ_W                                      $47     'object'
         70        FETCH_OBJ_W                                      $48     $47, 'port'
         71        MAKE_REF                                         $49     $48
         72        ASSIGN_OBJ_REF                                           'port'
         73        OP_DATA                                                  $49
   63    74        FETCH_OBJ_W                                      $51     'object'
         75        FETCH_OBJ_W                                      $52     $51, 'query'
         76        MAKE_REF                                         $53     $52
         77        ASSIGN_OBJ_REF                                           'query'
         78        OP_DATA                                                  $53
   64    79        FETCH_OBJ_W                                      $55     'object'
         80        FETCH_OBJ_W                                      $56     $55, 'scheme'
         81        MAKE_REF                                         $57     $56
         82        ASSIGN_OBJ_REF                                           'scheme'
         83        OP_DATA                                                  $57
   65    84        FETCH_OBJ_W                                      $59     'object'
         85        FETCH_OBJ_W                                      $60     $59, 'scheme_name'
         86        MAKE_REF                                         $61     $60
         87        ASSIGN_OBJ_REF                                           'scheme_name'
         88        OP_DATA                                                  $61
   66    89        FETCH_OBJ_W                                      $63     'object'
         90        FETCH_OBJ_W                                      $64     $63, 'scheme_symbols'
         91        MAKE_REF                                         $65     $64
         92        ASSIGN_OBJ_REF                                           'scheme_symbols'
         93        OP_DATA                                                  $65
   67    94        FETCH_OBJ_W                                      $67     'object'
         95        FETCH_OBJ_W                                      $68     $67, 'user'
         96        MAKE_REF                                         $69     $68
         97        ASSIGN_OBJ_REF                                           'user'
         98        OP_DATA                                                  $69
   68    99        FETCH_OBJ_W                                      $71     'object'
        100        FETCH_OBJ_W                                      $72     $71, 'username'
        101        MAKE_REF                                         $73     $72
        102        ASSIGN_OBJ_REF                                           'username'
        103        OP_DATA                                                  $73
        104      > JMP                                                      ->107
   70   105    >   ASSIGN_OBJ                                               'error'
        106        OP_DATA                                                  'Input+could+not+be+parsed+as+a+URI'
   72   107    > > RETURN                                                   null

End of function __construct

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  __toString
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   74     0  E >   INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'string'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $0      'object'
          3        SEND_FUNC_ARG                                            $0
          4        DO_FCALL                                      0  $1      
          5        VERIFY_RETURN_TYPE                                       $1
          6      > RETURN                                                   $1
   75     7*       VERIFY_RETURN_TYPE                                       
          8*     > RETURN                                                   null

End of function __tostring

Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  __invoke
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   77     0  E >   INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'string'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $0      'object'
          3        SEND_FUNC_ARG                                            $0
          4        DO_FCALL                                      0  $1      
          5      > RETURN                                                   $1
   78     6*     > RETURN                                                   null

End of function __invoke

Function __get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  __get
number of ops:  41
compiled vars:  !0 = $name, !1 = $trace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   79     0  E >   RECV                                             !0      
   80     1        FETCH_OBJ_IS                                     ~2      'object'
          2        ISSET_ISEMPTY_PROP_OBJ                                   ~2, !0
          3      > JMPZ                                                     ~3, ->18
   81     4    >   INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'scheme'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_OBJ_FUNC_ARG                               $4      'object'
          7        SEND_FUNC_ARG                                            $4
          8        DO_FCALL                                      0          
   82     9        INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'authority'
         10        CHECK_FUNC_ARG                                           
         11        FETCH_OBJ_FUNC_ARG                               $6      'object'
         12        SEND_FUNC_ARG                                            $6
         13        DO_FCALL                                      0          
   83    14        FETCH_OBJ_R                                      ~8      'object'
         15        FETCH_OBJ_R                                      ~9      ~8, !0
         16      > RETURN                                                   ~9
         17*       JMP                                                      ->40
   85    18    >   INIT_NS_FCALL_BY_NAME                                    'uri%5Cdebug_backtrace'
         19        DO_FCALL                                      0  $10     
         20        ASSIGN                                                   !1, $10
   86    21        INIT_NS_FCALL_BY_NAME                                    'uri%5Ctrigger_error'
   87    22        INIT_NS_FCALL_BY_NAME                                    'uri%5Csprintf'
   88    23        SEND_VAL_EX                                              'Undefined+property+via+%251%24s%3A%3A__get%28%29%3A+%27%252%24s%27+in+%253%24s+on+line+%254%24s'
   89    24        SEND_VAL_EX                                              'uri%5Curi%5Cmain'
   88    25        SEND_VAR_EX                                              !0
         26        CHECK_FUNC_ARG                                           
   91    27        FETCH_DIM_FUNC_ARG                               $12     !1, 0
         28        FETCH_DIM_FUNC_ARG                               $13     $12, 'file'
         29        SEND_FUNC_ARG                                            $13
         30        CHECK_FUNC_ARG                                           
   92    31        FETCH_DIM_FUNC_ARG                               $14     !1, 0
         32        FETCH_DIM_FUNC_ARG                               $15     $14, 'line'
         33        SEND_FUNC_ARG                                            $15
         34        DO_FCALL                                      0  $16     
         35        SEND_VAR_NO_REF_EX                                       $16
   94    36        FETCH_CONSTANT                                   ~17     'uri%5CE_USER_NOTICE'
         37        SEND_VAL_EX                                              ~17
         38        DO_FCALL                                      0          
   96    39      > RETURN                                                   null
   98    40*     > RETURN                                                   null

End of function __get

Function __set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  __set
number of ops:  36
compiled vars:  !0 = $name, !1 = $value, !2 = $trace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   99     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  100     2        INIT_STATIC_METHOD_CALL                                  'uri%5Cmodify', 'modify'
          3        CHECK_FUNC_ARG                                           
          4        FETCH_OBJ_FUNC_ARG                               $3      'object'
          5        SEND_FUNC_ARG                                            $3
          6        SEND_VAL_EX                                              'replace'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0  $4      
         10      > JMPZ                                                     $4, ->13
  101    11    > > RETURN                                                   !1
         12*       JMP                                                      ->35
  103    13    >   INIT_NS_FCALL_BY_NAME                                    'uri%5Cdebug_backtrace'
         14        DO_FCALL                                      0  $5      
         15        ASSIGN                                                   !2, $5
  104    16        INIT_NS_FCALL_BY_NAME                                    'uri%5Ctrigger_error'
  105    17        INIT_NS_FCALL_BY_NAME                                    'uri%5Csprintf'
  106    18        SEND_VAL_EX                                              'Forbidden+property+via+%251%24s%3A%3A__set%28%29%3A+%27%252%24s%27+in+%253%24s+on+line+%254%24s'
  107    19        SEND_VAL_EX                                              'uri%5Curi%5Cmain'
  106    20        SEND_VAR_EX                                              !0
         21        CHECK_FUNC_ARG                                           
  109    22        FETCH_DIM_FUNC_ARG                               $7      !2, 0
         23        FETCH_DIM_FUNC_ARG                               $8      $7, 'file'
         24        SEND_FUNC_ARG                                            $8
         25        CHECK_FUNC_ARG                                           
  110    26        FETCH_DIM_FUNC_ARG                               $9      !2, 0
         27        FETCH_DIM_FUNC_ARG                               $10     $9, 'line'
         28        SEND_FUNC_ARG                                            $10
         29        DO_FCALL                                      0  $11     
         30        SEND_VAR_NO_REF_EX                                       $11
  112    31        FETCH_CONSTANT                                   ~12     'uri%5CE_USER_NOTICE'
         32        SEND_VAL_EX                                              ~12
         33        DO_FCALL                                      0          
  114    34      > RETURN                                                   null
  116    35*     > RETURN                                                   null

End of function __set

Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  __isset
number of ops:  16
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  117     0  E >   RECV                                             !0      
  118     1        INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'scheme'
          2        CHECK_FUNC_ARG                                           
          3        FETCH_OBJ_FUNC_ARG                               $1      'object'
          4        SEND_FUNC_ARG                                            $1
          5        DO_FCALL                                      0          
  119     6        INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'authority'
          7        CHECK_FUNC_ARG                                           
          8        FETCH_OBJ_FUNC_ARG                               $3      'object'
          9        SEND_FUNC_ARG                                            $3
         10        DO_FCALL                                      0          
  120    11        FETCH_OBJ_IS                                     ~5      'object'
         12        ISSET_ISEMPTY_PROP_OBJ                           ~6      ~5, !0
         13        BOOL_NOT                                         ~7      ~6
         14      > RETURN                                                   ~7
  121    15*     > 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 = 19
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  __unset
number of ops:  42
compiled vars:  !0 = $name, !1 = $trace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  122     0  E >   RECV                                             !0      
  123     1        FETCH_OBJ_IS                                     ~2      'object'
          2        ISSET_ISEMPTY_PROP_OBJ                                   ~2, !0
          3      > JMPZ                                                     ~3, ->19
  124     4    >   FETCH_OBJ_W                                      $4      'object'
          5        ASSIGN_OBJ                                               $4, !0
          6        OP_DATA                                                  ''
  125     7        INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'scheme'
          8        CHECK_FUNC_ARG                                           
          9        FETCH_OBJ_FUNC_ARG                               $6      'object'
         10        SEND_FUNC_ARG                                            $6
         11        DO_FCALL                                      0          
  126    12        INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'authority'
         13        CHECK_FUNC_ARG                                           
         14        FETCH_OBJ_FUNC_ARG                               $8      'object'
         15        SEND_FUNC_ARG                                            $8
         16        DO_FCALL                                      0          
  127    17      > RETURN                                                   <true>
         18*       JMP                                                      ->40
  129    19    >   INIT_NS_FCALL_BY_NAME                                    'uri%5Cdebug_backtrace'
         20        DO_FCALL                                      0  $10     
         21        ASSIGN                                                   !1, $10
  130    22        INIT_NS_FCALL_BY_NAME                                    'uri%5Ctrigger_error'
  131    23        INIT_NS_FCALL_BY_NAME                                    'uri%5Csprintf'
  132    24        SEND_VAL_EX                                              'Undifined+property+via+%251%24s%3A%3A__unset%28%29%3A+%27%252%24s%27+in+%253%24s+on+line+%254%24s'
  133    25        SEND_VAL_EX                                              'uri%5Curi%5Cmain'
  132    26        SEND_VAR_EX                                              !0
         27        CHECK_FUNC_ARG                                           
  135    28        FETCH_DIM_FUNC_ARG                               $12     !1, 0
         29        FETCH_DIM_FUNC_ARG                               $13     $12, 'file'
         30        SEND_FUNC_ARG                                            $13
         31        CHECK_FUNC_ARG                                           
  136    32        FETCH_DIM_FUNC_ARG                               $14     !1, 0
         33        FETCH_DIM_FUNC_ARG                               $15     $14, 'line'
         34        SEND_FUNC_ARG                                            $15
         35        DO_FCALL                                      0  $16     
         36        SEND_VAR_NO_REF_EX                                       $16
  138    37        FETCH_CONSTANT                                   ~17     'uri%5CE_USER_NOTICE'
         38        SEND_VAL_EX                                              ~17
         39        DO_FCALL                                      0          
  141    40      > RETURN                                                   <false>
  142    41*     > RETURN                                                   null

End of function __unset

Function str:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  str
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  144     0  E >   INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'string'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $0      'object'
          3        SEND_FUNC_ARG                                            $0
          4        DO_FCALL                                      0  $1      
          5      > RETURN                                                   $1
  145     6*     > RETURN                                                   null

End of function str

Function to_string:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  to_string
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  147     0  E >   INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'string'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $0      'object'
          3        SEND_FUNC_ARG                                            $0
          4        DO_FCALL                                      0  $1      
          5      > RETURN                                                   $1
  148     6*     > RETURN                                                   null

End of function to_string

Function p_str:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  p_str
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  150     0  E >   INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'string'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $0      'object'
          3        SEND_FUNC_ARG                                            $0
          4        DO_FCALL                                      0  $1      
          5        ECHO                                                     $1
  151     6      > RETURN                                                   null

End of function p_str

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

End of function arr

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

End of function to_array

Function path_info:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  path_info
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  159     0  E >   INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'path_info'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $0      'object'
          3        SEND_FUNC_ARG                                            $0
          4        DO_FCALL                                      0  $1      
          5      > RETURN                                                   $1
  160     6*     > RETURN                                                   null

End of function path_info

Function query_arr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function name:  query_arr
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  162     0  E >   INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'query_array'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $0      'object'
          3        SEND_FUNC_ARG                                            $0
          4        DO_FCALL                                      0  $1      
          5      > RETURN                                                   $1
  163     6*     > RETURN                                                   null

End of function query_arr

Function replace:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kX143
function n

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
360.97 ms | 1428 KiB | 23 Q