3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Satmap; class Http { /* A place to store our $_SERVER var for work */ public static $server; /* Comparison constants for methods */ const GET = 'get'; const POST = 'post'; const PUT = 'put'; const DELETE = 'delete'; const PATCH = 'patch'; /* An array of all valid status codes */ public static $status_codes = [ 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 204 => 'No Content', 301 => 'Moved Permanently', 302 => 'Found', 304 => 'Not Modified', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 409 => 'Conflict', 418 => 'I\'m A Teapot', 420 => 'Rate Limited', 429 => 'Rate Limited', 500 => 'Server Error', 502 => 'Bad Gateway', 503 => 'Unavailable', 504 => 'Gateway Timeout' ]; /* An array of all valid http methods */ public static $methods = ['post','get','put','patch','delete']; /* An array of json mine types */ public static $json_mimes = ['application/json','text/json','text/javascript']; /* An array for url form */ public static $form_mimes = ['application/x-www-form-urlencoded']; /* Pass our SERVER to the class to work with */ public function __construct(){ self::$server = $_SERVER; } public static function collect(){ self::$server = $_SERVER; } /* Get and validate our method */ public static function method(){ return isset(self::$server['REQUEST_METHOD']) ? (in_array(strtolower(self::$server['REQUEST_METHOD']), self::$methods) ? strtolower(self::$server['REQUEST_METHOD']) : false) : false; } /* Check if request is secured */ public static function secure(){ if(self::$server['SERVER_PORT'] == 443 && self::$server['HTTPS'] !== ''){ return true; } else { return false; } } /* Get an array of query string */ public static function query(){ $query = self::$server['QUERY_STRING']; if(strlen($query) > 0){ parse_str($query,$array); return $array; } else { return false; } } /* Get an array of our path $offset will trip the array by that many keys this useful for treating subfolder as root */ public static function path($offset = null){ // Get our uri from the server $uri = self::$server['REQUEST_URI']; // Remove our query. if(self::query()){ $uri = str_replace("?".self::$server['QUERY_STRING'],"",$uri); } // Remove a trailing slash $length = strlen($uri); if($uri[$length-1] == "/"){ $uri = substr($uri,0,-1); } // Remove a preceding slash if($uri[0] == "/"){ $uri = substr($uri,1,$length); } // Split our string $uri = explode("/",$uri); // Process our offset if($offset){ for($i = 0; $i < $offset; $i++){ unset($uri[$i]); } } // Return our array return $uri; } /* Get post raw body */ public static function full_body(){ $body = file_get_contents('php://input'); return strlen($body) > 0 ? $body : false; } /* Gets a processed body */ public static function body(){ $body = self::full_body(); if($body && self::is_json()){ return json_decode($body); } else if($body && self::is_form()){ parse_str($body,$array); return $array; } else { return $body; } } /* Get our mime type */ public static function mime(){ $mime = (isset(self::$server['CONTENT_TYPE']) ? self::$server['CONTENT_TYPE'] : ""); return strlen($mime) ? $mime : false; } /* Checks if our body is JSON */ public static function is_json(){ return self::mime() && in_array(self::mime(),self::$json_mimes) ? true : false; } /* Checks if our body is FROM */ public static function is_form(){ return self::mime() && in_array(self::mime(),self::$form_mimes) ? true : false; } /* Set a header code for response */ public static function set_code($code){ return http_response_code($code); } /* Set a header code for response */ public static function set_mime($type){ return header('Content-Type: '.$type); } } Satmap\Router::get('hello/*',function(){ echo "Hello"; }); Satmap\Router::route(Satmap\Http::collect());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I8IKD
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  167     0  E >   INIT_STATIC_METHOD_CALL                                  'Satmap%5CSatmap%5CRouter', 'get'
          1        SEND_VAL_EX                                              'hello%2F%2A'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00satmap%5C%7Bclosure%7D%2Fin%2FI8IKD%3A167%240'
  169     3        SEND_VAL_EX                                              ~0
          4        DO_FCALL                                      0          
  171     5        INIT_STATIC_METHOD_CALL                                  'Satmap%5CSatmap%5CRouter', 'route'
          6        INIT_STATIC_METHOD_CALL                                  'Satmap%5CSatmap%5CHttp', 'collect'
          7        DO_FCALL                                      0  $2      
          8        SEND_VAR_NO_REF_EX                                       $2
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function %00satmap%5C%7Bclosure%7D%2Fin%2FI8IKD%3A167%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I8IKD
function name:  Satmap\{closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  168     0  E >   ECHO                                                     'Hello'
  169     1      > RETURN                                                   null

End of function %00satmap%5C%7Bclosure%7D%2Fin%2FI8IKD%3A167%240

Class Satmap\Http:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I8IKD
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   54     0  E >   FETCH_R                      global              ~1      '_SERVER'
          1        ASSIGN_STATIC_PROP                                       'server'
          2        OP_DATA                                                  ~1
   55     3      > RETURN                                                   null

End of function __construct

Function collect:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I8IKD
function name:  collect
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   58     0  E >   FETCH_R                      global              ~1      '_SERVER'
          1        ASSIGN_STATIC_PROP                                       'server'
          2        OP_DATA                                                  ~1
   59     3      > RETURN                                                   null

End of function collect

Function method:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 27
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 24
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I8IKD
function name:  method
number of ops:  30
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   63     0  E >   FETCH_STATIC_PROP_IS                             ~0      'server'
          1        ISSET_ISEMPTY_DIM_OBJ                         0          ~0, 'REQUEST_METHOD'
          2      > JMPZ                                                     ~1, ->27
          3    >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cin_array'
          4        INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cstrtolower'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_STATIC_PROP_FUNC_ARG   unknown             $2      'server'
          7        FETCH_DIM_FUNC_ARG                               $3      $2, 'REQUEST_METHOD'
          8        SEND_FUNC_ARG                                            $3
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR_NO_REF_EX                                       $4
         11        CHECK_FUNC_ARG                                           
         12        FETCH_STATIC_PROP_FUNC_ARG   unknown             $5      'methods'
         13        SEND_FUNC_ARG                                            $5
         14        DO_FCALL                                      0  $6      
         15      > JMPZ                                                     $6, ->24
         16    >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cstrtolower'
         17        CHECK_FUNC_ARG                                           
         18        FETCH_STATIC_PROP_FUNC_ARG   unknown             $7      'server'
         19        FETCH_DIM_FUNC_ARG                               $8      $7, 'REQUEST_METHOD'
         20        SEND_FUNC_ARG                                            $8
         21        DO_FCALL                                      0  $9      
         22        QM_ASSIGN                                        ~10     $9
         23      > JMP                                                      ->25
         24    >   QM_ASSIGN                                        ~10     <false>
         25    >   QM_ASSIGN                                        ~11     ~10
         26      > JMP                                                      ->28
         27    >   QM_ASSIGN                                        ~11     <false>
         28    > > RETURN                                                   ~11
   64    29*     > RETURN                                                   null

End of function method

Function secure:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/I8IKD
function name:  secure
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   68     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'server'
          1        FETCH_DIM_R                                      ~1      ~0, 'SERVER_PORT'
          2        IS_EQUAL                                         ~2      ~1, 443
          3      > JMPZ_EX                                          ~2      ~2, ->8
          4    >   FETCH_STATIC_PROP_R          unknown             ~3      'server'
          5        FETCH_DIM_R                                      ~4      ~3, 'HTTPS'
          6        IS_NOT_IDENTICAL                                 ~5      ~4, ''
          7        BOOL                                             ~2      ~5
          8    > > JMPZ                                                     ~2, ->11
          9    > > RETURN                                                   <true>
         10*       JMP                                                      ->12
   69    11    > > RETURN                                                   <false>
   70    12*     > RETURN                                                   null

End of function secure

Function query:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I8IKD
function name:  query
number of ops:  16
compiled vars:  !0 = $query, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   74     0  E >   FETCH_STATIC_PROP_R          unknown             ~2      'server'
          1        FETCH_DIM_R                                      ~3      ~2, 'QUERY_STRING'
          2        ASSIGN                                                   !0, ~3
   75     3        INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cstrlen'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $5      
          6        IS_SMALLER                                               0, $5
          7      > JMPZ                                                     ~6, ->14
   76     8    >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cparse_str'
          9        SEND_VAR_EX                                              !0
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
   77    12      > RETURN                                                   !1
         13*       JMP                                                      ->15
   78    14    > > RETURN                                                   <false>
   79    15*     > RETURN                                                   null

End of function query

Function path:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 30
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 39
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 51
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
2 jumps found. (Code = 44) Position 1 = 51, Position 2 = 47
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 51, Position 2 = 47
Branch analysis from position: 51
Branch analysis from position: 47
Branch analysis from position: 51
Branch analysis from position: 39
Branch analysis from position: 30
Branch analysis from position: 16
filename:       /in/I8IKD
function name:  path
number of ops:  53
compiled vars:  !0 = $offset, !1 = $uri, !2 = $length, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   85     0  E >   RECV_INIT                                        !0      null
   87     1        FETCH_STATIC_PROP_R          unknown             ~4      'server'
          2        FETCH_DIM_R                                      ~5      ~4, 'REQUEST_URI'
          3        ASSIGN                                                   !1, ~5
   90     4        INIT_STATIC_METHOD_CALL                                  'query'
          5        DO_FCALL                                      0  $7      
          6      > JMPZ                                                     $7, ->16
   91     7    >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cstr_replace'
          8        FETCH_STATIC_PROP_R          unknown             ~8      'server'
          9        FETCH_DIM_R                                      ~9      ~8, 'QUERY_STRING'
         10        CONCAT                                           ~10     '%3F', ~9
         11        SEND_VAL_EX                                              ~10
         12        SEND_VAL_EX                                              ''
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0  $11     
         15        ASSIGN                                                   !1, $11
   95    16    >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cstrlen'
         17        SEND_VAR_EX                                              !1
         18        DO_FCALL                                      0  $13     
         19        ASSIGN                                                   !2, $13
   96    20        SUB                                              ~15     !2, 1
         21        FETCH_DIM_R                                      ~16     !1, ~15
         22        IS_EQUAL                                                 ~16, '%2F'
         23      > JMPZ                                                     ~17, ->30
   97    24    >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Csubstr'
         25        SEND_VAR_EX                                              !1
         26        SEND_VAL_EX                                              0
         27        SEND_VAL_EX                                              -1
         28        DO_FCALL                                      0  $18     
         29        ASSIGN                                                   !1, $18
  101    30    >   FETCH_DIM_R                                      ~20     !1, 0
         31        IS_EQUAL                                                 ~20, '%2F'
         32      > JMPZ                                                     ~21, ->39
  102    33    >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Csubstr'
         34        SEND_VAR_EX                                              !1
         35        SEND_VAL_EX                                              1
         36        SEND_VAR_EX                                              !2
         37        DO_FCALL                                      0  $22     
         38        ASSIGN                                                   !1, $22
  106    39    >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cexplode'
         40        SEND_VAL_EX                                              '%2F'
         41        SEND_VAR_EX                                              !1
         42        DO_FCALL                                      0  $24     
         43        ASSIGN                                                   !1, $24
  109    44      > JMPZ                                                     !0, ->51
  110    45    >   ASSIGN                                                   !3, 0
         46      > JMP                                                      ->49
  111    47    >   UNSET_DIM                                                !1, !3
  110    48        PRE_INC                                                  !3
         49    >   IS_SMALLER                                               !3, !0
         50      > JMPNZ                                                    ~28, ->47
  116    51    > > RETURN                                                   !1
  117    52*     > RETURN                                                   null

End of function path

Function full_body:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I8IKD
function name:  full_body
number of ops:  14
compiled vars:  !0 = $body
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  121     0  E >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cfile_get_contents'
          1        SEND_VAL_EX                                              'php%3A%2F%2Finput'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
  122     4        INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cstrlen'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $3      
          7        IS_SMALLER                                               0, $3
          8      > JMPZ                                                     ~4, ->11
          9    >   QM_ASSIGN                                        ~5      !0
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~5      <false>
         12    > > RETURN                                                   ~5
  123    13*     > RETURN                                                   null

End of function full_body

Function body:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 24
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 7
filename:       /in/I8IKD
function name:  body
number of ops:  26
compiled vars:  !0 = $body, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  128     0  E >   INIT_STATIC_METHOD_CALL                                  'full_body'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
  130     3      > JMPZ_EX                                          ~4      !0, ->7
          4    >   INIT_STATIC_METHOD_CALL                                  'is_json'
          5        DO_FCALL                                      0  $5      
          6        BOOL                                             ~4      $5
          7    > > JMPZ                                                     ~4, ->13
  131     8    >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cjson_decode'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $6      
         11      > RETURN                                                   $6
         12*       JMP                                                      ->25
  132    13    > > JMPZ_EX                                          ~7      !0, ->17
         14    >   INIT_STATIC_METHOD_CALL                                  'is_form'
         15        DO_FCALL                                      0  $8      
         16        BOOL                                             ~7      $8
         17    > > JMPZ                                                     ~7, ->24
  133    18    >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cparse_str'
         19        SEND_VAR_EX                                              !0
         20        SEND_VAR_EX                                              !1
         21        DO_FCALL                                      0          
  134    22      > RETURN                                                   !1
         23*       JMP                                                      ->25
  136    24    > > RETURN                                                   !0
  138    25*     > RETURN                                                   null

End of function body

Function mime:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
Branch analysis from position: 15
filename:       /in/I8IKD
function name:  mime
number of ops:  18
compiled vars:  !0 = $mime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  142     0  E >   FETCH_STATIC_PROP_IS                             ~1      'server'
          1        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, 'CONTENT_TYPE'
          2      > JMPZ                                                     ~2, ->7
          3    >   FETCH_STATIC_PROP_R          unknown             ~3      'server'
          4        FETCH_DIM_R                                      ~4      ~3, 'CONTENT_TYPE'
          5        QM_ASSIGN                                        ~5      ~4
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~5      ''
          8    >   ASSIGN                                                   !0, ~5
  143     9        INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cstrlen'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $7      
         12      > JMPZ                                                     $7, ->15
         13    >   QM_ASSIGN                                        ~8      !0
         14      > JMP                                                      ->16
         15    >   QM_ASSIGN                                        ~8      <false>
         16    > > RETURN                                                   ~8
  144    17*     > RETURN                                                   null

End of function mime

Function is_json:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/I8IKD
function name:  is_json
number of ops:  18
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  148     0  E >   INIT_STATIC_METHOD_CALL                                  'mime'
          1        DO_FCALL                                      0  $0      
          2      > JMPZ_EX                                          ~1      $0, ->12
          3    >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cin_array'
          4        INIT_STATIC_METHOD_CALL                                  'mime'
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR_NO_REF_EX                                       $2
          7        CHECK_FUNC_ARG                                           
          8        FETCH_STATIC_PROP_FUNC_ARG   unknown             $3      'json_mimes'
          9        SEND_FUNC_ARG                                            $3
         10        DO_FCALL                                      0  $4      
         11        BOOL                                             ~1      $4
         12    > > JMPZ                                                     ~1, ->15
         13    >   QM_ASSIGN                                        ~5      <true>
         14      > JMP                                                      ->16
         15    >   QM_ASSIGN                                        ~5      <false>
         16    > > RETURN                                                   ~5
  149    17*     > RETURN                                                   null

End of function is_json

Function is_form:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/I8IKD
function name:  is_form
number of ops:  18
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  153     0  E >   INIT_STATIC_METHOD_CALL                                  'mime'
          1        DO_FCALL                                      0  $0      
          2      > JMPZ_EX                                          ~1      $0, ->12
          3    >   INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cin_array'
          4        INIT_STATIC_METHOD_CALL                                  'mime'
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR_NO_REF_EX                                       $2
          7        CHECK_FUNC_ARG                                           
          8        FETCH_STATIC_PROP_FUNC_ARG   unknown             $3      'form_mimes'
          9        SEND_FUNC_ARG                                            $3
         10        DO_FCALL                                      0  $4      
         11        BOOL                                             ~1      $4
         12    > > JMPZ                                                     ~1, ->15
         13    >   QM_ASSIGN                                        ~5      <true>
         14      > JMP                                                      ->16
         15    >   QM_ASSIGN                                        ~5      <false>
         16    > > RETURN                                                   ~5
  154    17*     > RETURN                                                   null

End of function is_form

Function set_code:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I8IKD
function name:  set_code
number of ops:  6
compiled vars:  !0 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  157     0  E >   RECV                                             !0      
  158     1        INIT_NS_FCALL_BY_NAME                                    'Satmap%5Chttp_response_code'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
  159     5*     > RETURN                                                   null

End of function set_code

Function set_mime:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I8IKD
function name:  set_mime
number of ops:  7
compiled vars:  !0 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  162     0  E >   RECV                                             !0      
  163     1        INIT_NS_FCALL_BY_NAME                                    'Satmap%5Cheader'
          2        CONCAT                                           ~1      'Content-Type%3A+', !0
          3        SEND_VAL_EX                                              ~1
          4        DO_FCALL                                      0  $2      
          5      > RETURN                                                   $2
  164     6*     > RETURN                                                   null

End of function set_mime

End of class Satmap\Http.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.2 ms | 1424 KiB | 35 Q