3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyException extends Exception { function __construct(string $message = "", int $code = 0, Throwable $previous = null) { parent::__construct($message, $code, $previous); $this->code = ['foo']; } } try { throw new MyException(); } catch (Exception $ex) { var_dump($ex); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) 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/KdCAm
function name:  (null)
number of ops:  9
compiled vars:  !0 = $ex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'MyException'
          1        DO_FCALL                                      0          
          2      > THROW                                         0          $1
          3*       JMP                                                      ->8
   12     4  E > > CATCH                                       last         'Exception'
   13     5    >   INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   14     8      > RETURN                                                   1

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

End of function __construct

End of class MyException.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.85 ms | 1395 KiB | 15 Q