3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyException extends Exception { public function __construct($message, $code=0, Exception $previous = null) { if (version_compare(PHP_VERSION, '5.3.0') >= 0) { parent::__construct($message,$code,$previous); } else { parent::__construct($message,$code); } } public function __toString() { return __CLASS__. ":[{$this->code}]:{$this->message}\n"; } } throw new MyException("Foo");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/rquX5
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'myexception', 'exception'
   19     1        NEW                                              $0      'MyException'
          2        SEND_VAL_EX                                              'Foo'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $0
          5*     > RETURN                                                   1

Class MyException:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rquX5
function name:  __construct
number of ops:  20
compiled vars:  !0 = $message, !1 = $code, !2 = $previous
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      0
          2        RECV_INIT                                        !2      null
    7     3        INIT_FCALL                                               'version_compare'
          4        SEND_VAL                                                 '8.0.0'
          5        SEND_VAL                                                 '5.3.0'
          6        DO_ICALL                                         $3      
          7        IS_SMALLER_OR_EQUAL                                      0, $3
          8      > JMPZ                                                     ~4, ->15
    8     9    >   INIT_STATIC_METHOD_CALL                                  
         10        SEND_VAR_EX                                              !0
         11        SEND_VAR_EX                                              !1
         12        SEND_VAR_EX                                              !2
         13        DO_FCALL                                      0          
         14      > JMP                                                      ->19
   11    15    >   INIT_STATIC_METHOD_CALL                                  
         16        SEND_VAR_EX                                              !0
         17        SEND_VAR_EX                                              !1
         18        DO_FCALL                                      0          
   13    19    > > RETURN                                                   null

End of function __construct

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rquX5
function name:  __toString
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ROPE_INIT                                     5  ~3      '%3A%5B'
          1        FETCH_OBJ_R                                      ~0      'code'
          2        ROPE_ADD                                      1  ~3      ~3, ~0
          3        ROPE_ADD                                      2  ~3      ~3, '%5D%3A'
          4        FETCH_OBJ_R                                      ~1      'message'
          5        ROPE_ADD                                      3  ~3      ~3, ~1
          6        ROPE_END                                      4  ~2      ~3, '%0A'
          7        CONCAT                                           ~6      'MyException', ~2
          8        VERIFY_RETURN_TYPE                                       ~6
          9      > RETURN                                                   ~6
   16    10*       VERIFY_RETURN_TYPE                                       
         11*     > RETURN                                                   null

End of function __tostring

End of class MyException.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
213.39 ms | 1400 KiB | 15 Q