3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyException extends Exception { public static function throw($message) { throw new static($message); } } try { $nothing ?? MyException::throw('hooray'); } catch (Exception $e) { echo "Exception caught: $e"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
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/e49n2
function name:  (null)
number of ops:  12
compiled vars:  !0 = $nothing, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   COALESCE                                         ~2      !0
          1        INIT_STATIC_METHOD_CALL                                  'MyException', 'throw'
          2        SEND_VAL                                                 'hooray'
          3        DO_FCALL                                      0  $3      
          4        QM_ASSIGN                                        ~2      $3
          5        FREE                                                     ~2
          6      > JMP                                                      ->11
   13     7  E > > CATCH                                       last         'Exception'
   14     8    >   NOP                                                      
          9        FAST_CONCAT                                      ~4      'Exception+caught%3A+', !1
         10        ECHO                                                     ~4
   15    11    > > RETURN                                                   1

Class MyException:
Function throw:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/e49n2
function name:  throw
number of ops:  6
compiled vars:  !0 = $message
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        NEW                          static              $1      
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
    8     5*     > RETURN                                                   null

End of function throw

End of class MyException.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.29 ms | 1394 KiB | 13 Q