3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { try { return 5; } finally { try { // NOOP } catch(Exception $e) { // NOOP var_export($e); } finally { // NOOP } } } $a = test(); if($a !== 5) { echo "FAILED: expected 5, recieved ", var_export($a), PHP_EOL; } else { echo "Passed", PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eJUci
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'test'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   19     3        IS_NOT_IDENTICAL                                         !0, 5
          4      > JMPZ                                                     ~3, ->12
   20     5    >   ECHO                                                     'FAILED%3A+expected+5%2C+recieved+'
          6        INIT_FCALL                                               'var_export'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        ECHO                                                     $4
         10        ECHO                                                     '%0A'
         11      > JMP                                                      ->14
   22    12    >   ECHO                                                     'Passed'
         13        ECHO                                                     '%0A'
   23    14    > > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 162) Position 1 = 4, Position 2 = 1
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 162) Position 1 = 11, Position 2 = 10
Branch analysis from position: 11
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 1
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
2 jumps found. (Code = 162) Position 1 = 11, Position 2 = 10
Branch analysis from position: 11
Branch analysis from position: 10
filename:       /in/eJUci
function name:  test
number of ops:  14
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > FAST_CALL                                                ->4
          1    > > RETURN                                                   5
    6     2*       FAST_CALL                                                ->4
          3*       JMP                                                      ->13
    7     4    > > JMP                                                      ->9
    9     5  E > > CATCH                                       last         'Exception'
   11     6    >   INIT_FCALL                                               'var_export'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   12     9    > > FAST_CALL                                                ->11
         10    > > JMP                                                      ->12
         11    > > FAST_RET                                                 
         12    > > FAST_RET                                                 
   16    13*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.96 ms | 1403 KiB | 16 Q