3v4l.org

run code in 300+ PHP versions simultaneously
<?php register_shutdown_function(function() { echo "first shutdown\n"; }); final class Another { public function __destruct() { //exit(); //throw new \RuntimeException('test'); } } final class Logger { public function __construct() { register_shutdown_function(function () { echo "shutdown\n"; }); } public function __destruct() { echo "destruct\n"; } } new Another(); new Logger(); register_shutdown_function(function() { echo "second shutdown\n"; }); 42/0;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/moNUq
function name:  (null)
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'register_shutdown_function'
          1        DECLARE_LAMBDA_FUNCTION                          ~0      [0]
    5     2        SEND_VAL                                                 ~0
    3     3        DO_ICALL                                                 
   31     4        NEW                                              $2      'Another'
          5        DO_FCALL                                      0          
          6        FREE                                                     $2
   32     7        NEW                                              $4      'Logger'
          8        DO_FCALL                                      0          
          9        FREE                                                     $4
   34    10        INIT_FCALL                                               'register_shutdown_function'
         11        DECLARE_LAMBDA_FUNCTION                          ~6      [1]
   36    12        SEND_VAL                                                 ~6
   34    13        DO_ICALL                                                 
   39    14        DIV                                              ~8      42, 0
         15        FREE                                                     ~8
   40    16      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/moNUq
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'first+shutdown%0A'
    5     1      > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/moNUq
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   ECHO                                                     'second+shutdown%0A'
   36     1      > RETURN                                                   null

End of Dynamic Function 1

Class Another:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/moNUq
function name:  __destruct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   null

End of function __destruct

End of class Another.

Class Logger:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/moNUq
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'register_shutdown_function'
          1        DECLARE_LAMBDA_FUNCTION                          ~0      [0]
   22     2        SEND_VAL                                                 ~0
   20     3        DO_ICALL                                                 
   23     4      > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/moNUq
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     'shutdown%0A'
   22     1      > RETURN                                                   null

End of Dynamic Function 0

End of function __construct

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

End of function __destruct

End of class Logger.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.34 ms | 1018 KiB | 14 Q