3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { /** * @return resource */ public function baz() { throw new \Exception(); } public function bar(): void { try { $handle = $this->baz(); } finally { echo isset($handle) ? 'ok' : 'ko'; } } } (new Foo())->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nUfFW
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   23     0  E >   NEW                                                  $0      'Foo'
          1        DO_FCALL                                          0          
          2        INIT_METHOD_CALL                                             $0, 'bar'
          3        DO_FCALL                                          0          
          4      > RETURN                                                       1

Class Foo:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/nUfFW
function name:  baz
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   NEW                                                  $0      'Exception'
          1        DO_FCALL                                          0          
          2      > THROW                                             0          $0
   11     3*     > RETURN                                                       null

End of function baz

Function bar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 162) Position 1 = 5, Position 2 = 4
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nUfFW
function name:  bar
number of ops:  13
compiled vars:  !0 = $handle
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   INIT_METHOD_CALL                                             'baz'
          1        DO_FCALL                                          0  $2      
          2        ASSIGN                                                       !0, $2
   17     3      > FAST_CALL                                                    ->5
          4    > > JMP                                                          ->12
   18     5    >   ISSET_ISEMPTY_CV                                             !0
          6      > JMPZ                                                         ~4, ->9
          7    >   QM_ASSIGN                                            ~5      'ok'
          8      > JMP                                                          ->10
          9    >   QM_ASSIGN                                            ~5      'ko'
         10    >   ECHO                                                         ~5
         11      > FAST_RET                                                     
   20    12    > > RETURN                                                       null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.46 ms | 2037 KiB | 13 Q