3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function ($err_severity, $err_msg, $err_file, $err_line, array $err_context) { throw new Exception(); }); $grade = 10; try { $grade = $grade % 0; } catch (Exception $e) { $grade = 0; } var_dump($grade);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9hs7J
function name:  (null)
number of ops:  14
compiled vars:  !0 = $grade, !1 = $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%2F9hs7J%3A3%240'
    5     2        SEND_VAL                                                 ~2
          3        DO_ICALL                                                 
    7     4        ASSIGN                                                   !0, 10
    9     5        MOD                                              ~5      !0, 0
          6        ASSIGN                                                   !0, ~5
          7      > JMP                                                      ->10
   10     8  E > > CATCH                                       last         'Exception'
   11     9    >   ASSIGN                                                   !0, 0
   13    10    >   INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.76 ms | 1396 KiB | 17 Q