3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); class Test { private \finfo $finfo; public function __construct() { $finfo = finfo_open(); if ($finfo === false) { throw new \RuntimeException(); } $this->finfo = $finfo; var_dump('opened'); } public function close(): void { finfo_close($this->finfo); var_dump('closed'); } } $t = new Test(); $t->close();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oZPVJ
function name:  (null)
number of ops:  6
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_METHOD_CALL                                         !0, 'close'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oZPVJ
function name:  __construct
number of ops:  14
compiled vars:  !0 = $finfo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'finfo_open'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
    8     3        TYPE_CHECK                                    4          !0
          4      > JMPZ                                                     ~3, ->8
    9     5    >   NEW                                              $4      'RuntimeException'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $4
   12     8    >   ASSIGN_OBJ                                               'finfo'
          9        OP_DATA                                                  !0
   13    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAL                                                 'opened'
         12        DO_ICALL                                                 
   14    13      > RETURN                                                   null

End of function __construct

Function close:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oZPVJ
function name:  close
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'finfo_close'
          1        FETCH_OBJ_R                                      ~0      'finfo'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   18     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAL                                                 'closed'
          6        DO_ICALL                                                 
   19     7      > RETURN                                                   null

End of function close

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.11 ms | 1018 KiB | 16 Q