3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public function __debugInfo(): array { throw new \Error('x'); } } try { $a = new A(); // print_r($a->__debuginfo()); print_r($a, true); } catch (\Throwable $e) { echo $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YTfSl
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   NEW                                                  $2      'A'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
   14     3        INIT_FCALL                                                   'print_r'
          4        SEND_VAR                                                     !0
          5        SEND_VAL                                                     <true>
          6        DO_ICALL                                                     
          7      > JMP                                                          ->12
   15     8  E > > CATCH                                           last         'Throwable'
   16     9    >   INIT_METHOD_CALL                                             !1, 'getMessage'
         10        DO_FCALL                                          0  $6      
         11        ECHO                                                         $6
   17    12    > > RETURN                                                       1

Class A:
Function __debuginfo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/YTfSl
function name:  __debugInfo
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   NEW                                                  $0      'Error'
          1        SEND_VAL_EX                                                  'x'
          2        DO_FCALL                                          0          
          3      > THROW                                             0          $0
    8     4*       VERIFY_RETURN_TYPE                                           
          5*     > RETURN                                                       null

End of function __debuginfo

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
141.27 ms | 3420 KiB | 14 Q