3v4l.org

run code in 300+ PHP versions simultaneously
<?php class d { function __destruct() { throw new Exception; } } try { new d + new d; } catch (Exception $e) { print "Exception properly caught"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u62Fp
function name:  (null)
number of ops:  10
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $1      'd'
          1        DO_FCALL                                      0          
          2        NEW                                              $3      'd'
          3        DO_FCALL                                      0          
          4        ADD                                              ~5      $1, $3
          5        FREE                                                     ~5
          6      > JMP                                                      ->9
          7  E > > CATCH                                       last         'Exception'
          8    >   ECHO                                                     'Exception+properly+caught'
          9    > > RETURN                                                   1

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

End of function __destruct

End of class d.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.83 ms | 1393 KiB | 13 Q