3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @link https://bugs.php.net/bug.php?id=62452 */ $handler = function($exception) { restore_exception_handler(); // boom echo "Exception handled, move along.\n"; }; set_exception_handler((function($exception) { restore_exception_handler(); // boom echo "Exception handled, move along.\n"; })); throw new Exception; // fatal error: cannot destroy active lambda
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/rb647
function name:  (null)
number of ops:  10
compiled vars:  !0 = $handler
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_LAMBDA_FUNCTION                          ~1      [0]
          1        ASSIGN                                                   !0, ~1
   11     2        INIT_FCALL                                               'set_exception_handler'
          3        DECLARE_LAMBDA_FUNCTION                          ~3      [1]
   14     4        SEND_VAL                                                 ~3
   11     5        DO_ICALL                                                 
   16     6        NEW                                              $5      'Exception'
          7        DO_FCALL                                      0          
          8      > THROW                                         0          $5
          9*     > 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/rb647
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $exception
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'restore_exception_handler'
          2        DO_ICALL                                                 
    8     3        ECHO                                                     'Exception+handled%2C+move+along.%0A'
    9     4      > 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/rb647
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $exception
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'restore_exception_handler'
          2        DO_ICALL                                                 
   13     3        ECHO                                                     'Exception+handled%2C+move+along.%0A'
   14     4      > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
242.87 ms | 954 KiB | 15 Q