3v4l.org

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

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.75 ms | 2633 KiB | 15 Q