3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyException extends Exception { public function __construct($message = "", $code = 0, Throwable $previous = null) { print "2. Exception constructor\n"; parent::__construct($message, $code, $previous); } } function ololo() { try { print "1. Start\n"; throw new MyException("4. Exception message\n"); } finally { return "3. Return statement\n"; } } try { print ololo(); } catch (Exception $e) { print $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C16rP
function name:  (null)
number of ops:  9
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'ololo'
          1        DO_FCALL                                      0  $1      
          2        ECHO                                                     $1
          3      > JMP                                                      ->8
   23     4  E > > CATCH                                       last         'Exception'
   24     5    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          6        DO_FCALL                                      0  $2      
          7        ECHO                                                     $2
   25     8    > > RETURN                                                   1

Function ololo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/C16rP
function name:  ololo
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     '1.+Start%0A'
   15     1        NEW                                              $1      'MyException'
          2        SEND_VAL_EX                                              '4.+Exception+message%0A'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
   16     5*       FAST_CALL                                                ->7
          6*       JMP                                                      ->10
   17     7*       DISCARD_EXCEPTION                                        
          8*       RETURN                                                   '3.+Return+statement%0A'
          9*       FAST_RET                                                 
   19    10*     > RETURN                                                   null

End of function ololo

Class MyException:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C16rP
function name:  __construct
number of ops:  10
compiled vars:  !0 = $message, !1 = $code, !2 = $previous
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      ''
          1        RECV_INIT                                        !1      0
          2        RECV_INIT                                        !2      null
    7     3        ECHO                                                     '2.+Exception+constructor%0A'
    8     4        INIT_STATIC_METHOD_CALL                                  
          5        SEND_VAR_EX                                              !0
          6        SEND_VAR_EX                                              !1
          7        SEND_VAR_EX                                              !2
          8        DO_FCALL                                      0          
    9     9      > RETURN                                                   null

End of function __construct

End of class MyException.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.64 ms | 1007 KiB | 14 Q