3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function($no, $str, $file, $line) { throw new ErrorException($str, 0, $no, $file, $line); }); try { trigger_error("You dun made a mistaek", E_USER_WARNING); } catch(\Exception $e) { echo "Halp! I cant rite teh codez: " . $e->getMessage() . "\n" . $e->getTraceAsString(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
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/IlKkV
function name:  (null)
number of ops:  19
compiled vars:  !0 = $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%2FIlKkV%3A3%240'
    5     2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
    8     4        INIT_FCALL                                               'trigger_error'
          5        SEND_VAL                                                 'You+dun+made+a+mistaek'
          6        SEND_VAL                                                 512
          7        DO_ICALL                                                 
          8      > JMP                                                      ->18
    9     9  E > > CATCH                                       last         'Exception'
   10    10    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         11        DO_FCALL                                      0  $4      
         12        CONCAT                                           ~5      'Halp%21+I+cant+rite+teh+codez%3A+', $4
         13        CONCAT                                           ~6      ~5, '%0A'
         14        INIT_METHOD_CALL                                         !0, 'getTraceAsString'
         15        DO_FCALL                                      0  $7      
         16        CONCAT                                           ~8      ~6, $7
         17        ECHO                                                     ~8
   11    18    > > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.31 ms | 1396 KiB | 17 Q