3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public static function run() { $o = new Test('o'); throw new Exception('destroyer ?'); } public static function shutdown() { echo 'fin script'."\n"; } public function __construct(){ echo 'constructeur'."\n"; } public function __destruct(){ echo 'destructeur'."\n"; } } register_shutdown_function(array('Test','shutdown')); try{ Test::run(); } catch(Exception $e) { print_r($e->getStackTrace()); }
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: 6
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/38CkQ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'register_shutdown_function'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                                 
   22     3        INIT_STATIC_METHOD_CALL                                  'Test', 'run'
          4        DO_FCALL                                      0          
          5      > JMP                                                      ->12
   23     6  E > > CATCH                                       last         'Exception'
   24     7    >   INIT_FCALL                                               'print_r'
          8        INIT_METHOD_CALL                                         !0, 'getStackTrace'
          9        DO_FCALL                                      0  $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                                 
   25    12    > > RETURN                                                   1

Class Test:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/38CkQ
function name:  run
number of ops:  9
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $1      'Test'
          1        SEND_VAL_EX                                              'o'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    7     4        NEW                                              $4      'Exception'
          5        SEND_VAL_EX                                              'destroyer+%3F'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $4
    8     8*     > RETURN                                                   null

End of function run

Function shutdown:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/38CkQ
function name:  shutdown
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     'fin+script%0A'
   12     1      > RETURN                                                   null

End of function shutdown

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/38CkQ
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     'constructeur%0A'
   15     1      > RETURN                                                   null

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/38CkQ
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ECHO                                                     'destructeur%0A'
   18     1      > RETURN                                                   null

End of function __destruct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.39 ms | 1400 KiB | 17 Q