3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HTTPGETResponse { const RECVPROGRESS_NODATA = 0; const RECVPROGRESS_HEAD = 1; const RECVPROGRESS_BODY = 2; const RECVPROGRESS_TRAIL = 3; const RECVPROGRESS_END = 4; const ERR_NOERROR = 0; const ERR_MALFORMEDRESPONSE = 1; const ERR_INVALIDCONTENTLENGTH = 2; private $buffer = ''; private $unchunk = FALSE; public $error = 0; public $recvProgress = 0; public $httpVersion; public $responseCode; public $responseMsg; public $body = ''; public $contentLength = 0; public $headers = array(); public function create() { return new $this(); } private function setErrorState($state) { $this->error = $state; $this->buffer = NULL; } private function getBufferLine() { $line = FALSE; if (FALSE !== $pos = strpos($this->buffer, "\r\n")) { $line = substr($this->buffer, 0, $pos); $this->buffer = substr($this->buffer, $pos + 2); } return $line; } private function processBufferLine($line) { if ($this->recvProgress === self::RECVPROGRESS_NODATA) { $this->processResponseLine($line); } else { $this->processHeaderLine($line); } } private function processResponseLine($line) { if (!preg_match('#^HTTP/(1\.[01]) (\d{3}) (.+)$#i', rtrim($line), $matches)) { $this->setErrorState(self::ERR_MALFORMEDRESPONSE); } else { $this->httpVersion = $matches[1]; $this->responseCode = (int) $matches[2]; $this->responseMsg = $matches[3]; $this->recvProgress = self::RECVPROGRESS_HEAD; } } private function processHeaderLine($line) { if ($line === "\r\n") { if ($this->recvProgress === self::RECVPROGRESS_HEAD) { $this->unchunk = isset($this->headers['transfer-encoding']) && strtolower($this->headers['transfer-encoding']) === 'chunked'; $this->recvProgress = self::RECVPROGRESS_BODY; } } else { list($key, $val) = explode(':', $line, 2); $key = strtolower(trim($key)); $val = trim($val); if (!isset($this->headers[$key])) { $this->headers[$key] = array(); } $this->headers[$key][] = $val; } } private function processBodyData() { if ($this->unchunk) { $this->processBodyChunks(); } else { $this->body .= $this->buffer; $this->buffer = ''; } } private function processBodyChunks() { if (strlen($this->buffer)) { if (!preg_match('/^([\da-f]+)\r\n/i', $this->buffer, $matches)) { $chunkLen = hexdec($matches[1]); if ($chunkLen > 0) { $headerLen = strlen($matches[1]) + 2; if (strlen($this->buffer) >= $chunkLen + $headerLen + 2) { $this->body .= substr($this->buffer, $headerLen, $chunkLen); $this->buffer = substr($this->buffer, $chunkLen + $headerLen + 2); } } else { $this->buffer = (string) substr($this->buffer, 5); $this->recvProgress = self::RECVPROGRESS_TRAIL; } } else { $this->setErrorState(self::ERR_MALFORMEDRESPONSE); } } } public function progress($str) { if (!$this->error) { $this->buffer .= $str; while ($this->recvProgress !== self::RECVPROGRESS_BODY && FALSE !== $line = $this->getBufferLine()) { $this->processBufferLine($line); if ($this->error) { break; } } if ($this->recvProgress === self::RECVPROGRESS_BODY) { $this->processBodyData(); } } return $this->error; } public function close() { $this->recvProgress = self::RECVPROGRESS_END; $this->contentLength = strlen($this->body); if (!$this->error && isset($this->headers['content-length'])) { if ($this->contentLength !== (int) $this->headers['content-length']) { $this->setErrorState(self::ERR_INVALIDCONTENTLENGTH); } } } } $factory = new HTTPGETResponse(); $response = $factory->create(); $chunks = array("HTTP/1.1 200 OK\r\nServer: yo-mama\r\n\r\nbooooooobs"); foreach($chunks as $chunk) { $response->progress($chunk); if ($response->error) { echo "Error!\n"; break; } } print_r($response);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 17
Branch analysis from position: 17
filename:       /in/bUmAc
function name:  (null)
number of ops:  22
compiled vars:  !0 = $factory, !1 = $response, !2 = $chunks, !3 = $chunk
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  141     0  E >   NEW                                              $4      'HTTPGETResponse'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
  142     3        INIT_METHOD_CALL                                         !0, 'create'
          4        DO_FCALL                                      0  $7      
          5        ASSIGN                                                   !1, $7
  144     6        ASSIGN                                                   !2, <array>
  145     7      > FE_RESET_R                                       $10     !2, ->17
          8    > > FE_FETCH_R                                               $10, !3, ->17
  146     9    >   INIT_METHOD_CALL                                         !1, 'progress'
         10        SEND_VAR_EX                                              !3
         11        DO_FCALL                                      0          
  147    12        FETCH_OBJ_R                                      ~12     !1, 'error'
         13      > JMPZ                                                     ~12, ->16
  148    14    >   ECHO                                                     'Error%21%0A'
  149    15      > JMP                                                      ->17
  145    16    > > JMP                                                      ->8
         17    >   FE_FREE                                                  $10
  153    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Class HTTPGETResponse:
Function create:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bUmAc
function name:  create
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   FETCH_THIS                                       ~0      
          1        FETCH_CLASS                                   0  $1      ~0
          2        NEW                                              $2      $1
          3        DO_FCALL                                      0          
          4      > RETURN                                                   $2
   32     5*     > RETURN                                                   null

End of function create

Function seterrorstate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bUmAc
function name:  setErrorState
number of ops:  6
compiled vars:  !0 = $state
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   RECV                                             !0      
   35     1        ASSIGN_OBJ                                               'error'
          2        OP_DATA                                                  !0
   36     3        ASSIGN_OBJ                                               'buffer'
          4        OP_DATA                                                  null
   37     5      > RETURN                                                   null

End of function seterrorstate

Function getbufferline:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 24
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/bUmAc
function name:  getBufferLine
number of ops:  26
compiled vars:  !0 = $line, !1 = $pos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E >   ASSIGN                                                   !0, <false>
   41     1        INIT_FCALL                                               'strpos'
          2        FETCH_OBJ_R                                      ~3      'buffer'
          3        SEND_VAL                                                 ~3
          4        SEND_VAL                                                 '%0D%0A'
          5        DO_ICALL                                         $4      
          6        ASSIGN                                           ~5      !1, $4
          7        TYPE_CHECK                                  1018          ~5
          8      > JMPZ                                                     ~6, ->24
   42     9    >   INIT_FCALL                                               'substr'
         10        FETCH_OBJ_R                                      ~7      'buffer'
         11        SEND_VAL                                                 ~7
         12        SEND_VAL                                                 0
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $8      
         15        ASSIGN                                                   !0, $8
   43    16        INIT_FCALL                                               'substr'
         17        FETCH_OBJ_R                                      ~11     'buffer'
         18        SEND_VAL                                                 ~11
         19        ADD                                              ~12     !1, 2
         20        SEND_VAL                                                 ~12
         21        DO_ICALL                                         $13     
         22        ASSIGN_OBJ                                               'buffer'
         23        OP_DATA                                                  $13
   45    24    > > RETURN                                                   !0
   46    25*     > RETURN                                                   null

End of function getbufferline

Function processbufferline:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bUmAc
function name:  processBufferLine
number of ops:  12
compiled vars:  !0 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   48     0  E >   RECV                                             !0      
   49     1        FETCH_OBJ_R                                      ~1      'recvProgress'
          2        IS_IDENTICAL                                             ~1, 0
          3      > JMPZ                                                     ~2, ->8
   50     4    >   INIT_METHOD_CALL                                         'processResponseLine'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7      > JMP                                                      ->11
   52     8    >   INIT_METHOD_CALL                                         'processHeaderLine'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
   54    11    > > RETURN                                                   null

End of function processbufferline

Function processresponseline:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bUmAc
function name:  processResponseLine
number of ops:  28
compiled vars:  !0 = $line, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   56     0  E >   RECV                                             !0      
   57     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%23%5EHTTP%2F%281%5C.%5B01%5D%29+%28%5Cd%7B3%7D%29+%28.%2B%29%24%23i'
          3        INIT_FCALL                                               'rtrim'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        SEND_REF                                                 !1
          8        DO_ICALL                                         $3      
          9        BOOL_NOT                                         ~4      $3
         10      > JMPZ                                                     ~4, ->15
   58    11    >   INIT_METHOD_CALL                                         'setErrorState'
         12        SEND_VAL                                                 1
         13        DO_FCALL                                      0          
         14      > JMP                                                      ->27
   60    15    >   FETCH_DIM_R                                      ~7      !1, 1
         16        ASSIGN_OBJ                                               'httpVersion'
         17        OP_DATA                                                  ~7
   61    18        FETCH_DIM_R                                      ~9      !1, 2
         19        CAST                                          4  ~10     ~9
         20        ASSIGN_OBJ                                               'responseCode'
         21        OP_DATA                                                  ~10
   62    22        FETCH_DIM_R                                      ~12     !1, 3
         23        ASSIGN_OBJ                                               'responseMsg'
         24        OP_DATA                                                  ~12
   63    25        ASSIGN_OBJ                                               'recvProgress'
         26        OP_DATA                                                  1
   65    27    > > RETURN                                                   null

End of function processresponseline

Function processheaderline:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 20
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 20
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 49
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
filename:       /in/bUmAc
function name:  processHeaderLine
number of ops:  54
compiled vars:  !0 = $line, !1 = $key, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   67     0  E >   RECV                                             !0      
   68     1        IS_IDENTICAL                                             !0, '%0D%0A'
          2      > JMPZ                                                     ~3, ->21
   69     3    >   FETCH_OBJ_R                                      ~4      'recvProgress'
          4        IS_IDENTICAL                                             ~4, 1
          5      > JMPZ                                                     ~5, ->20
   70     6    >   FETCH_OBJ_IS                                     ~7      'headers'
          7        ISSET_ISEMPTY_DIM_OBJ                         0  ~8      ~7, 'transfer-encoding'
          8      > JMPZ_EX                                          ~8      ~8, ->16
          9    >   INIT_FCALL                                               'strtolower'
         10        FETCH_OBJ_R                                      ~9      'headers'
         11        FETCH_DIM_R                                      ~10     ~9, 'transfer-encoding'
         12        SEND_VAL                                                 ~10
         13        DO_ICALL                                         $11     
         14        IS_IDENTICAL                                     ~12     $11, 'chunked'
         15        BOOL                                             ~8      ~12
         16    >   ASSIGN_OBJ                                               'unchunk'
         17        OP_DATA                                                  ~8
   71    18        ASSIGN_OBJ                                               'recvProgress'
         19        OP_DATA                                                  2
         20    > > JMP                                                      ->53
   74    21    >   INIT_FCALL                                               'explode'
         22        SEND_VAL                                                 '%3A'
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 2
         25        DO_ICALL                                         $14     
         26        FETCH_LIST_R                                     $15     $14, 0
         27        ASSIGN                                                   !1, $15
         28        FETCH_LIST_R                                     $17     $14, 1
         29        ASSIGN                                                   !2, $17
         30        FREE                                                     $14
   75    31        INIT_FCALL                                               'strtolower'
         32        INIT_FCALL                                               'trim'
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                         $19     
         35        SEND_VAR                                                 $19
         36        DO_ICALL                                         $20     
         37        ASSIGN                                                   !1, $20
   76    38        INIT_FCALL                                               'trim'
         39        SEND_VAR                                                 !2
         40        DO_ICALL                                         $22     
         41        ASSIGN                                                   !2, $22
   77    42        FETCH_OBJ_IS                                     ~24     'headers'
         43        ISSET_ISEMPTY_DIM_OBJ                         0  ~25     ~24, !1
         44        BOOL_NOT                                         ~26     ~25
         45      > JMPZ                                                     ~26, ->49
   78    46    >   FETCH_OBJ_W                                      $27     'headers'
         47        ASSIGN_DIM                                               $27, !1
         48        OP_DATA                                                  <array>
   80    49    >   FETCH_OBJ_W                                      $29     'headers'
         50        FETCH_DIM_W                                      $30     $29, !1
         51        ASSIGN_DIM                                               $30
         52        OP_DATA                                                  !2
   82    53    > > RETURN                                                   null

End of function processheaderline

Function processbodydata:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bUmAc
function name:  processBodyData
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   85     0  E >   FETCH_OBJ_R                                      ~0      'unchunk'
          1      > JMPZ                                                     ~0, ->5
   86     2    >   INIT_METHOD_CALL                                         'processBodyChunks'
          3        DO_FCALL                                      0          
          4      > JMP                                                      ->10
   88     5    >   FETCH_OBJ_R                                      ~3      'buffer'
          6        ASSIGN_OBJ_OP                                 8          'body'
          7        OP_DATA                                                  ~3
   89     8        ASSIGN_OBJ                                               'buffer'
          9        OP_DATA                                                  ''
   91    10    > > RETURN                                                   null

End of function processbodydata

Function processbodychunks:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 60
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 57
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 46
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 45
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 60
Branch analysis from position: 60
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 60
Branch analysis from position: 60
Branch analysis from position: 57
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 60
filename:       /in/bUmAc
function name:  processBodyChunks
number of ops:  61
compiled vars:  !0 = $matches, !1 = $chunkLen, !2 = $headerLen
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   94     0  E >   FETCH_OBJ_R                                      ~3      'buffer'
          1        STRLEN                                           ~4      ~3
          2      > JMPZ                                                     ~4, ->60
   95     3    >   INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2F%5E%28%5B%5Cda-f%5D%2B%29%5Cr%5Cn%2Fi'
          5        FETCH_OBJ_R                                      ~5      'buffer'
          6        SEND_VAL                                                 ~5
          7        SEND_REF                                                 !0
          8        DO_ICALL                                         $6      
          9        BOOL_NOT                                         ~7      $6
         10      > JMPZ                                                     ~7, ->57
   96    11    >   INIT_FCALL                                               'hexdec'
         12        FETCH_DIM_R                                      ~8      !0, 1
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !1, $9
   97    16        IS_SMALLER                                               0, !1
         17      > JMPZ                                                     ~11, ->46
   98    18    >   FETCH_DIM_R                                      ~12     !0, 1
         19        STRLEN                                           ~13     ~12
         20        ADD                                              ~14     ~13, 2
         21        ASSIGN                                                   !2, ~14
   99    22        FETCH_OBJ_R                                      ~16     'buffer'
         23        STRLEN                                           ~17     ~16
         24        ADD                                              ~18     !1, !2
         25        ADD                                              ~19     ~18, 2
         26        IS_SMALLER_OR_EQUAL                                      ~19, ~17
         27      > JMPZ                                                     ~20, ->45
  100    28    >   INIT_FCALL                                               'substr'
         29        FETCH_OBJ_R                                      ~22     'buffer'
         30        SEND_VAL                                                 ~22
         31        SEND_VAR                                                 !2
         32        SEND_VAR                                                 !1
         33        DO_ICALL                                         $23     
         34        ASSIGN_OBJ_OP                                 8          'body'
         35        OP_DATA                                                  $23
  101    36        INIT_FCALL                                               'substr'
         37        FETCH_OBJ_R                                      ~25     'buffer'
         38        SEND_VAL                                                 ~25
         39        ADD                                              ~26     !1, !2
         40        ADD                                              ~27     ~26, 2
         41        SEND_VAL                                                 ~27
         42        DO_ICALL                                         $28     
         43        ASSIGN_OBJ                                               'buffer'
         44        OP_DATA                                                  $28
         45    > > JMP                                                      ->56
  104    46    >   INIT_FCALL                                               'substr'
         47        FETCH_OBJ_R                                      ~30     'buffer'
         48        SEND_VAL                                                 ~30
         49        SEND_VAL                                                 5
         50        DO_ICALL                                         $31     
         51        CAST                                          6  ~32     $31
         52        ASSIGN_OBJ                                               'buffer'
         53        OP_DATA                                                  ~32
  105    54        ASSIGN_OBJ                                               'recvProgress'
         55        OP_DATA                                                  3
         56    > > JMP                                                      ->60
  108    57    >   INIT_METHOD_CALL                                         'setErrorState'
         58        SEND_VAL                                                 1
         59        DO_FCALL                                      0          
  111    60    > > RETURN                                                   null

End of function processbodychunks

Function progress:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 27
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 46) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 7
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 13
Branch analysis from position: 21
Branch analysis from position: 27
filename:       /in/bUmAc
function name:  progress
number of ops:  30
compiled vars:  !0 = $str, !1 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  113     0  E >   RECV                                             !0      
  114     1        FETCH_OBJ_R                                      ~2      'error'
          2        BOOL_NOT                                         ~3      ~2
          3      > JMPZ                                                     ~3, ->27
  115     4    >   ASSIGN_OBJ_OP                                 8          'buffer'
          5        OP_DATA                                                  !0
  116     6      > JMP                                                      ->13
  117     7    >   INIT_METHOD_CALL                                         'processBufferLine'
          8        SEND_VAR                                                 !1
          9        DO_FCALL                                      0          
  118    10        FETCH_OBJ_R                                      ~6      'error'
         11      > JMPZ                                                     ~6, ->13
  119    12    > > JMP                                                      ->22
  116    13    >   FETCH_OBJ_R                                      ~7      'recvProgress'
         14        IS_NOT_IDENTICAL                                 ~8      ~7, 2
         15      > JMPZ_EX                                          ~8      ~8, ->21
         16    >   INIT_METHOD_CALL                                         'getBufferLine'
         17        DO_FCALL                                      0  $9      
         18        ASSIGN                                           ~10     !1, $9
         19        TYPE_CHECK                                  1018  ~11     ~10
         20        BOOL                                             ~8      ~11
         21    > > JMPNZ                                                    ~8, ->7
  122    22    >   FETCH_OBJ_R                                      ~12     'recvProgress'
         23        IS_IDENTICAL                                             ~12, 2
         24      > JMPZ                                                     ~13, ->27
  123    25    >   INIT_METHOD_CALL                                         'processBodyData'
         26        DO_FCALL                                      0          
  126    27    >   FETCH_OBJ_R                                      ~15     'error'
         28      > RETURN                                                   ~15
  127    29*     > RETURN                                                   null

End of function progress

Function close:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
Branch analysis from position: 22
Branch analysis from position: 12
filename:       /in/bUmAc
function name:  close
number of ops:  23
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  130     0  E >   ASSIGN_OBJ                                               'recvProgress'
          1        OP_DATA                                                  4
  131     2        FETCH_OBJ_R                                      ~2      'body'
          3        STRLEN                                           ~3      ~2
          4        ASSIGN_OBJ                                               'contentLength'
          5        OP_DATA                                                  ~3
  132     6        FETCH_OBJ_R                                      ~4      'error'
          7        BOOL_NOT                                         ~5      ~4
          8      > JMPZ_EX                                          ~5      ~5, ->12
          9    >   FETCH_OBJ_IS                                     ~6      'headers'
         10        ISSET_ISEMPTY_DIM_OBJ                         0  ~7      ~6, 'content-length'
         11        BOOL                                             ~5      ~7
         12    > > JMPZ                                                     ~5, ->22
  133    13    >   FETCH_OBJ_R                                      ~8      'contentLength'
         14        FETCH_OBJ_R                                      ~9      'headers'
         15        FETCH_DIM_R                                      ~10     ~9, 'content-length'
         16        CAST                                          4  ~11     ~10
         17        IS_NOT_IDENTICAL                                         ~8, ~11
         18      > JMPZ                                                     ~12, ->22
  134    19    >   INIT_METHOD_CALL                                         'setErrorState'
         20        SEND_VAL                                                 2
         21        DO_FCALL                                      0          
  137    22    > > RETURN                                                   null

End of function close

End of class HTTPGETResponse.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.3 ms | 1416 KiB | 31 Q