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 $chain; 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(!empty($this->object->host)){\uri\generate::authority($this->object);\uri\generate::aliases($this->object);$this->chain=new \uri\chain($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 {$this->_err('UNDEFINED',debug_backtrace(),$name);return NULL;}} public function __set($name,$value){if(isset($this->object->$name)&&$name!='authority'){\uri\actions::modify($this->object,'replace',$name,$value);return $value;}else {$this->_err('FORBIDDEN',debug_backtrace(),$name);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)&&$name!='host'&&$name!='authority'){\uri\actions::modify($this->object,'replace',$name,'');return TRUE;}elseif(isset($this->object->$name)){$this->_err('FORBIDDEN',debug_backtrace(),$name);}else {$this->_err('UNDEFINED',debug_backtrace(),$name);}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(){$arr=array('authority'=>$this->object->authority,'fragment'=>$this->object->fragment,'host'=>$this->object->host,'pass'=>$this->object->pass,'path'=>$this->object->path,'port'=>$this->object->port,'query'=>$this->object->query,'scheme'=>$this->object->scheme,'scheme_name'=>$this->object->scheme_name,'scheme_symbols'=>$this->object->scheme_symbols,'user'=>$this->object->user,);$arr['domain']=&$arr['host'];$arr['fqdn']=&$arr['host'];$arr['password']=&$arr['pass'];$arr['protocol']=&$arr['scheme'];$arr['username']=&$arr['user'];ksort($arr);return $arr;} public function to_array(){return $this->arr();} 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\actions::modify($this->object,'replace',$section,$str);} public function prepend($section,$str){return \uri\actions::modify($this->object,'prepend',$section,$str);} public function append($section,$str){return \uri\actions::modify($this->object,'append',$section,$str);} public function query_add($key,$value){return \uri\query::add($this->object,$key,$value);} public function query_replace($key,$value){\uri\query::replace($this->object,$key,$value);} public function query_remove($key){\uri\query::remove($this->object,$key);} public function query_exists($key){return \uri\query::exists($this->object,$key);} public function query_get($key){return \uri\query::get($this->object,$key);} public function query_rename($key,$new_key){return \uri\query::rename($this->object,$key,$new_key);} public function chain(){return $this->chain;} public function reset(){$this->__construct($this->input);} private function _err($type,$trace,$name){$fmt='Undifined property via <code>%1$s::%2$s()</code>: Property <code>%3$s</code> cannot be unset in <b>%4$s</b> on line <b>%5$s</b>. Error triggered';if($type=='FORBIDDEN'){$fmt='Forbidden property via <code>%1$s::%2$s()</code>: Property <code>%3$s</code> cannot be unset in <b>%4$s</b> on line <b>%5$s</b>. Error triggered';}trigger_error(sprintf($fmt,$trace[0]['class'],$trace[0]['function'],$name,$trace[0]['file'],$trace[0]['line']),E_USER_NOTICE);}}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)){$parsed=array_fill(1,10,'');}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 scheme_name(&$object,$action,$str){$org=$object->scheme_name;\uri\actions::callback($object,$action,__FUNCTION__,$str);if(!(preg_match('/\A[a-z]{1,10}\Z/',$object->scheme_name)||empty($str))){$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;\uri\actions::callback($object,$action,__FUNCTION__,$str);if(!(preg_match('/\A(:)?([\/]{2,3})?\Z/',$object->scheme_symbols)||empty($str))){$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);\uri\actions::callback($object,$action,__FUNCTION__,$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){return self::scheme($object,$action,$str);} public static function user(&$object,$action,$str){$str=rawurlencode($str);\uri\actions::callback($object,$action,__FUNCTION__,$str);return \uri\generate::string($object);} public static function username(&$object,$action,$str){return self::user($object,$action,$str);} public static function pass(&$object,$action,$str){$str=rawurlencode($str);\uri\actions::callback($object,$action,__FUNCTION__,$str);return \uri\generate::string($object);} public static function password(&$object,$action,$str){return self::pass($object,$action,$str);} public static function host(&$object,$action,$str){$org=$object->host;\uri\actions::callback($object,$action,__FUNCTION__,$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))){$object->host=$org;return FALSE;}return \uri\generate::string($object);} public static function domain(&$object,$action,$str){return self::host($object,$action,$str);} public static function fqdn(&$object,$action,$str){return self::host($object,$action,$str);} public static function port(&$object,$action,$str){$org=$object->port;if(isset($str[0])&&$str[0]==':'){$str=substr($str,1);}\uri\actions::callback($object,$action,__FUNCTION__,$str);if(!(preg_match('/\A[0-9]{0,5}\Z/',$object->port)||empty($str))){$object->port=$org;return FALSE;}return \uri\generate::string($object);} public static function path(&$object,$action,$str){\uri\actions::callback($object,$action,__FUNCTION__,$str);return \uri\generate::string($object);} public static function query(&$object,$action,$str){if(isset($str[0])&&$str[0]=='?'){$str=substr($str,1);}\uri\actions::callback($object,$action,__FUNCTION__,$str);return \uri\generate::string($object);} public static function fragment(&$object,$action,$str){if(isset($str[0])&&$str[0]=='#'){$str=substr($str,1);}$str=urlencode($str);\uri\actions::callback($object,$action,__FUNCTION__,$str);return \uri\generate::string($object);}}class actions{ public static function modify(&$object,$action,$section,$str){settype($section,'string');settype($str,'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 callback(&$object,$action,$section,$str){switch($action){case 'replace':$object->$section=$str;break;case 'prepend':$object->$section=$str.$object->$section;break;case 'append':$object->$section=$object->$section.$str;}}}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 (array)$return;}}class query{ public static function add(&$object,$key,$value){$qarray=\uri\generate::query_array($object);} public static function replace(&$object,$key,$value){$qarray=\uri\generate::query_array($object);} public static function remove(&$object,$key){$qarray=\uri\generate::query_array($object);} public static function exists(&$object,$key){$qarray=\uri\generate::query_array($object);} public static function get(&$object,$key){$qarray=\uri\generate::query_array($object);} public static function rename(&$object,$key,$new_key){$qarray=\uri\generate::query_array($object);}}class chain{ private $object; public function __construct(&$object){$this->object=&$object;return $this;} public function p_str(){echo \uri\generate::string($this->object);return $this;} public function replace($section,$str){\uri\actions::modify($this->object,'replace',$section,$str);return $this;} public function prepend($section,$str){\uri\actions::modify($this->object,'prepend',$section,$str);return $this;} public function append($section,$str){\uri\actions::modify($this->object,'append',$section,$str);return $this;}}} namespace { $uri = new uri('ftp://jdoe:pass1234@my-server.com/public_html'); foreach (range(1,10000) as $test_num) { $uri->chain()-> replace('SCHEME_NAME', 'ftps')-> replace('PORT', '22')-> replace('USER', 'admin')-> replace('PASS', 'secure-pass-123'); } echo $uri; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 31
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 31
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/CJot0
function name:  (null)
number of ops:  34
compiled vars:  !0 = $uri, !1 = $test_num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   DECLARE_CLASS                                            'uri', 'uri%5Cmain'
          1        DECLARE_CLASS                                            'uri%5Cmain'
   22     2        NEW                                              $2      'uri'
          3        SEND_VAL_EX                                              'ftp%3A%2F%2Fjdoe%3Apass1234%40my-server.com%2Fpublic_html'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   24     6        INIT_FCALL                                               'range'
          7        SEND_VAL                                                 1
          8        SEND_VAL                                                 10000
          9        DO_ICALL                                         $5      
         10      > FE_RESET_R                                       $6      $5, ->31
         11    > > FE_FETCH_R                                               $6, !1, ->31
   25    12    >   INIT_METHOD_CALL                                         !0, 'chain'
         13        DO_FCALL                                      0  $7      
   26    14        INIT_METHOD_CALL                                         $7, 'replace'
         15        SEND_VAL_EX                                              'SCHEME_NAME'
         16        SEND_VAL_EX                                              'ftps'
         17        DO_FCALL                                      0  $8      
   27    18        INIT_METHOD_CALL                                         $8, 'replace'
         19        SEND_VAL_EX                                              'PORT'
         20        SEND_VAL_EX                                              '22'
         21        DO_FCALL                                      0  $9      
   28    22        INIT_METHOD_CALL                                         $9, 'replace'
         23        SEND_VAL_EX                                              'USER'
         24        SEND_VAL_EX                                              'admin'
         25        DO_FCALL                                      0  $10     
   29    26        INIT_METHOD_CALL                                         $10, 'replace'
         27        SEND_VAL_EX                                              'PASS'
         28        SEND_VAL_EX                                              'secure-pass-123'
         29        DO_FCALL                                      0          
   24    30      > JMP                                                      ->11
         31    >   FE_FREE                                                  $6
   32    32        ECHO                                                     !0
   33    33      > 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 = 12, Position 2 = 110
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 112
Branch analysis from position: 112
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 110
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CJot0
function name:  __construct
number of ops:  113
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        ASSIGN_OBJ                                               'input'
          2        OP_DATA                                                  !0
          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
          8        FETCH_OBJ_IS                                     ~4      'object'
          9        ISSET_ISEMPTY_PROP_OBJ                           ~5      ~4, 'host'
         10        BOOL_NOT                                         ~6      ~5
         11      > JMPZ                                                     ~6, ->110
         12    >   INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'authority'
         13        CHECK_FUNC_ARG                                           
         14        FETCH_OBJ_FUNC_ARG                               $7      'object'
         15        SEND_FUNC_ARG                                            $7
         16        DO_FCALL                                      0          
         17        INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'aliases'
         18        CHECK_FUNC_ARG                                           
         19        FETCH_OBJ_FUNC_ARG                               $9      'object'
         20        SEND_FUNC_ARG                                            $9
         21        DO_FCALL                                      0          
         22        NEW                                              $12     'uri%5Cchain'
         23        CHECK_FUNC_ARG                                           
         24        FETCH_OBJ_FUNC_ARG                               $13     'object'
         25        SEND_FUNC_ARG                                            $13
         26        DO_FCALL                                      0          
         27        ASSIGN_OBJ                                               'chain'
         28        OP_DATA                                                  $12
         29        FETCH_OBJ_W                                      $16     'object'
         30        FETCH_OBJ_W                                      $17     $16, 'authority'
         31        MAKE_REF                                         $18     $17
         32        ASSIGN_OBJ_REF                                           'authority'
         33        OP_DATA                                                  $18
         34        FETCH_OBJ_W                                      $20     'object'
         35        FETCH_OBJ_W                                      $21     $20, 'domain'
         36        MAKE_REF                                         $22     $21
         37        ASSIGN_OBJ_REF                                           'domain'
         38        OP_DATA                                                  $22
         39        FETCH_OBJ_W                                      $24     'object'
         40        FETCH_OBJ_W                                      $25     $24, 'fqdn'
         41        MAKE_REF                                         $26     $25
         42        ASSIGN_OBJ_REF                                           'fqdn'
         43        OP_DATA                                                  $26
         44        FETCH_OBJ_W                                      $28     'object'
         45        FETCH_OBJ_W                                      $29     $28, 'fragment'
         46        MAKE_REF                                         $30     $29
         47        ASSIGN_OBJ_REF                                           'fragment'
         48        OP_DATA                                                  $30
         49        FETCH_OBJ_W                                      $32     'object'
         50        FETCH_OBJ_W                                      $33     $32, 'host'
         51        MAKE_REF                                         $34     $33
         52        ASSIGN_OBJ_REF                                           'host'
         53        OP_DATA                                                  $34
         54        FETCH_OBJ_W                                      $36     'object'
         55        FETCH_OBJ_W                                      $37     $36, 'protocol'
         56        MAKE_REF                                         $38     $37
         57        ASSIGN_OBJ_REF                                           'protocol'
         58        OP_DATA                                                  $38
         59        FETCH_OBJ_W                                      $40     'object'
         60        FETCH_OBJ_W                                      $41     $40, 'pass'
         61        MAKE_REF                                         $42     $41
         62        ASSIGN_OBJ_REF                                           'pass'
         63        OP_DATA                                                  $42
         64        FETCH_OBJ_W                                      $44     'object'
         65        FETCH_OBJ_W                                      $45     $44, 'password'
         66        MAKE_REF                                         $46     $45
         67        ASSIGN_OBJ_REF                                           'password'
         68        OP_DATA                                                  $46
         69        FETCH_OBJ_W                                      $48     'object'
         70        FETCH_OBJ_W                                      $49     $48, 'path'
         71        MAKE_REF                                         $50     $49
         72        ASSIGN_OBJ_REF                                           'path'
         73        OP_DATA                                                  $50
         74        FETCH_OBJ_W                                      $52     'object'
         75        FETCH_OBJ_W                                      $53     $52, 'port'
         76        MAKE_REF                                         $54     $53
         77        ASSIGN_OBJ_REF                                           'port'
         78        OP_DATA                                                  $54
         79        FETCH_OBJ_W                                      $56     'object'
         80        FETCH_OBJ_W                                      $57     $56, 'query'
         81        MAKE_REF                                         $58     $57
         82        ASSIGN_OBJ_REF                                           'query'
         83        OP_DATA                                                  $58
         84        FETCH_OBJ_W                                      $60     'object'
         85        FETCH_OBJ_W                                      $61     $60, 'scheme'
         86        MAKE_REF                                         $62     $61
         87        ASSIGN_OBJ_REF                                           'scheme'
         88        OP_DATA                                                  $62
         89        FETCH_OBJ_W                                      $64     'object'
         90        FETCH_OBJ_W                                      $65     $64, 'scheme_name'
         91        MAKE_REF                                         $66     $65
         92        ASSIGN_OBJ_REF                                           'scheme_name'
         93        OP_DATA                                                  $66
         94        FETCH_OBJ_W                                      $68     'object'
         95        FETCH_OBJ_W                                      $69     $68, 'scheme_symbols'
         96        MAKE_REF                                         $70     $69
         97        ASSIGN_OBJ_REF                                           'scheme_symbols'
         98        OP_DATA                                                  $70
         99        FETCH_OBJ_W                                      $72     'object'
        100        FETCH_OBJ_W                                      $73     $72, 'user'
        101        MAKE_REF                                         $74     $73
        102        ASSIGN_OBJ_REF                                           'user'
        103        OP_DATA                                                  $74
        104        FETCH_OBJ_W                                      $76     'object'
        105        FETCH_OBJ_W                                      $77     $76, 'username'
        106        MAKE_REF                                         $78     $77
        107        ASSIGN_OBJ_REF                                           'username'
        108        OP_DATA                                                  $78
        109      > JMP                                                      ->112
        110    >   ASSIGN_OBJ                                               'error'
        111        OP_DATA                                                  'Input+could+not+be+parsed+as+a+URI'
        112    > > 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/CJot0
function name:  __toString
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          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
          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/CJot0
function name:  __invoke
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          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
          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/CJot0
function name:  __get
number of ops:  27
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        FETCH_OBJ_IS                                     ~1      'object'
          2        ISSET_ISEMPTY_PROP_OBJ                                   ~1, !0
          3      > JMPZ                                                     ~2, ->18
          4    >   INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'scheme'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_OBJ_FUNC_ARG                               $3      'object'
          7        SEND_FUNC_ARG                                            $3
          8        DO_FCALL                                      0          
          9        INIT_STATIC_METHOD_CALL                                  'uri%5Cgenerate', 'authority'
         10        CHECK_FUNC_ARG                                           
         11        FETCH_OBJ_FUNC_ARG                               $5      'object'
         12        SEND_FUNC_ARG                                            $5
         13        DO_FCALL                                      0          
         14        FETCH_OBJ_R                                      ~7      'object'
         15        FETCH_OBJ_R                                      ~8      ~7, !0
         16      > RETURN                                                   ~8
         17*       JMP                                                      ->26
         18    >   INIT_METHOD_CALL                                         '_err'
         19        SEND_VAL_EX                                              'UNDEFINED'
         20        INIT_NS_FCALL_BY_NAME                                    'uri%5Cdebug_backtrace'
         21        DO_FCALL                                      0  $9      
         22        SEND_VAR_NO_REF_EX                                       $9
         23        SEND_VAR_EX                                              !0
         24        DO_FCALL                                      0          
         25      > RETURN                                                   null
         26*     > RETURN                                                   null

End of function __get

Function __set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/CJot0
function name:  __set
number of ops:  27
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_OBJ_IS                                     ~2      'object'
          3        ISSET_ISEMPTY_PROP_OBJ                           ~3      ~2, !0
          4      > JMPZ_EX                                          ~3      ~3, ->7
          5    >   IS_NOT_EQUAL                                     ~4      !0, 'authority'
          6        BOOL                                             ~3      ~4
          7    > > JMPZ                                                     ~3, ->18
          8    >   INIT_STATIC_METHOD_CALL                                  'uri%5Cactions', 'modify'
          9        CHECK_FUNC_ARG                                           
         10        FETCH_OBJ_FUNC_ARG                               $5      'object'
         11        SEND_FUNC_ARG                                            $5
         12        SEND_VAL_EX                                              'replace'
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
         16      > RETURN                                                   !1
         17*       JMP                                                      ->26
         18    >   INIT_METHOD_CALL                                         '_err'
         19        SEND_VAL_EX                                              'FORBIDDEN'
         20        INIT_NS_FCALL_BY_NAME                                    'uri%5Cdebug_backtrace'
         21        DO_FCALL                                      0  $7      
         22        SEND_VAR_NO_REF_EX                                       $7
         23        SEND_VAR_EX                                              !0
         24        DO_FCALL                                      0          
         25      > RETURN                                                   null
         26*     > 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/CJot0
function name:  __isset
number of ops:  16
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          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          
          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          
         11        FETCH_OBJ_IS                                     ~5      'object'
         12        ISSET_ISEMPTY_PROP_OBJ                           ~6      ~5, !0
         13        BOOL_NOT                                         ~7      ~6
         14      > RETURN                                                   ~7
         15*     > RETURN                                                   null

End of function __isset

Function __unset:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 31
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
Branch analysis from position: 6
filename:       /in/CJot0
function name:  __unset
number of ops:  40
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        FETCH_OBJ_IS                                     ~1      'object'
          2        ISSET_ISEMPTY_PROP_OBJ                           ~2      ~1, !0
          3      > JMPZ_EX                                          ~2      ~2, ->6
          4    >   IS_NOT_EQUAL                                     ~3      !0, 'host'
          5        BOOL                                             ~2      ~3
          6    > > JMPZ_EX                                          ~2      ~2, ->9
          7    >   IS_NOT_EQUAL                                     ~4      !0, 'authority'
          8        BOOL                                             ~2      ~4
          9    > > JMPZ                                                     ~2, ->20
         10    >   INIT_STATIC_METHOD_CALL                                  'uri%5Cactions', 'modify'
         11        CHECK_FUNC_ARG                                           
         12        FETCH_OBJ_FUNC_ARG                               $5      'object'
         13        SEND_FUNC_ARG                                            $5
         14        SEND_VAL_EX                                              'replace'
         15        SEND_VAR_EX                                              !0
         16        SEND_VAL_EX                                              ''
         17        DO_FCALL                                      0          
         18      > RETURN                                                   <true>
         19*       JMP                                                      ->38
         20    >   FETCH_OBJ_IS                                     ~7      'object'
         21        ISSET_ISEMPTY_PROP_OBJ                                   ~7, !0
         22      > JMPZ                                                     ~8, ->31
         23    >   INIT_METHOD_CALL                                         '_err'
         24        SEND_VAL_EX                                              'FORBIDDEN'
         25        INIT_NS_FCALL_BY_NAME                                    'uri%5Cdebug_backtrace'
         26        DO_FCALL                                      0  $9      
         27        SEND_VAR_NO_REF_EX                                       $9
         28        SEND_VAR_EX                                              !0
         29        DO_FCALL                                      0          
         30      > JMP                                                      ->38
         31    >   INIT_METHOD_CALL                                         '_err'
         32        SEND_VAL_EX                                              'UNDEFINED'
         33        INIT_NS_FCALL_BY_NAME                                    'uri%5Cdebug_backtrace'
         34        DO_FCALL                                      0  $11     
         35        SEND_VAR_NO_REF_EX                                       $11
         36        SEND_VAR_EX                                              !0
         37        DO_FCALL                                      0          
         38    > > RETURN                                                   <false>
         39*     > 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/CJot0
function name:  str
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          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
          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/CJot0
function name:  to_string
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          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
          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/CJot0
function name:  p_str
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          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
          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/CJot0
function name:  arr
number of ops:  59
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   FETCH_OBJ_R                                      ~1      'object'
          1        FETCH_OBJ_R                                      ~2      ~1, 'authority'
          2        INIT_ARRAY                                       ~3      ~2, 'authority'
          3        FETCH_OBJ_R                                      ~4      'object'
          4        FETCH_OBJ_R                                      ~5      ~4, 'fragment'
          5        ADD_ARRAY_ELEMENT                                ~3      ~5, 'fragment'
          6        FETCH_OBJ_R                                      ~6      'object'
          7        FETCH_OBJ_R                                      ~7      ~6, 'host'
          8        ADD_ARRAY_ELEMENT                                ~3      ~7, 'host'
          9        FETCH_OBJ_R                                      ~8      'object'
         10        FETCH_OBJ_R                                      ~9      ~8, 'pass'
         11        ADD_ARRAY_ELEMENT                                ~3      ~9, 'pass'
         12        FETCH_OBJ_R                                      ~10     'object'
         13        FETCH_OBJ_R                                      ~11     ~10, 'path'
         14        ADD_ARRAY_ELEMENT                                ~3      ~11, 'path'
         15        FETCH_OBJ_R                                      ~12     'object'
         16        FETCH_OBJ_R                                      ~13     ~12, 'port'
         17        ADD_ARRAY_ELEMENT                                ~3      ~13, 'port'
         18        FETCH_OBJ_R                               

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
255.75 ms | 1428 KiB | 18 Q