3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = function () { throw new \Exception('You juicy vagina :D'); }; $canIGetException = function () { $e = (new \Exception)->getPrevious(); var_dump($e); }; try { $test(); } catch (\Exception $e) { $canIGetException(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
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/tIT2P
function name:  (null)
number of ops:  11
compiled vars:  !0 = $test, !1 = $canIGetException, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtIT2P%3A3%240'
          1        ASSIGN                                                   !0, ~3
    7     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtIT2P%3A7%241'
          3        ASSIGN                                                   !1, ~5
   14     4        INIT_DYNAMIC_CALL                                        !0
          5        DO_FCALL                                      0          
          6      > JMP                                                      ->10
   15     7  E > > CATCH                                       last         'Exception'
   16     8    >   INIT_DYNAMIC_CALL                                        !1
          9        DO_FCALL                                      0          
   17    10    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FtIT2P%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/tIT2P
function name:  {closure}
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $0      'Exception'
          1        SEND_VAL_EX                                              'You+juicy+vagina+%3AD'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
    5     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtIT2P%3A3%240

Function %00%7Bclosure%7D%2Fin%2FtIT2P%3A7%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tIT2P
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $1      'Exception'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $1, 'getPrevious'
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !0, $3
   10     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   11     8      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtIT2P%3A7%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.79 ms | 1396 KiB | 15 Q