3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function($errNo, $errStr) { throw new Exception($errStr, $errNo); }); $one = 1; $zero = 0; try { $infinity = $one / $zero; } catch (Exception $e) { echo "You will see me now, I caught this exception: " . $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 9
Branch analysis from position: 9
2 jumps found. (Code = 107) Position 1 = 10, Position 2 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c2isg
function name:  (null)
number of ops:  15
compiled vars:  !0 = $one, !1 = $zero, !2 = $infinity, !3 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fc2isg%3A3%240'
    5     2        SEND_VAL                                                 ~4
          3        DO_ICALL                                                 
    7     4        ASSIGN                                                   !0, 1
    8     5        ASSIGN                                                   !1, 0
   11     6        DIV                                              ~8      !0, !1
          7        ASSIGN                                                   !2, ~8
          8      > JMP                                                      ->14
   12     9  E > > CATCH                                       last         'Exception'
   13    10    >   INIT_METHOD_CALL                                         !3, 'getMessage'
         11        DO_FCALL                                      0  $10     
         12        CONCAT                                           ~11     'You+will+see+me+now%2C+I+caught+this+exception%3A+', $10
         13        ECHO                                                     ~11
   14    14    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fc2isg%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/c2isg
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $errNo, !1 = $errStr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        NEW                                              $2      'Exception'
          3        SEND_VAR_EX                                              !1
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
    5     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fc2isg%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.37 ms | 1396 KiB | 15 Q