3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myErrorHandler($errno, $errstr, $errfile, $errline) { echo "I regret nothing, except ".$errstr."\n"; /* Don't execute PHP internal error handler */ return true; } $old_error_handler = set_error_handler("myErrorHandler"); echo "start\n"; try { trigger_error("I R ERROR\n", E_USER_ERROR); } catch (Exception $e) { echo "Caught exception\n"; } echo "end\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 10
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/STUvu
function name:  (null)
number of ops:  14
compiled vars:  !0 = $old_error_handler, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'myErrorHandler'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
   15     4        ECHO                                                     'start%0A'
   18     5        INIT_FCALL                                               'trigger_error'
          6        SEND_VAL                                                 'I+R+ERROR%0A'
          7        SEND_VAL                                                 256
          8        DO_ICALL                                                 
          9      > JMP                                                      ->12
   19    10  E > > CATCH                                       last         'Exception'
   20    11    >   ECHO                                                     'Caught+exception%0A'
   23    12    >   ECHO                                                     'end%0A'
         13      > RETURN                                                   1

Function myerrorhandler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/STUvu
function name:  myErrorHandler
number of ops:  9
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    7     4        CONCAT                                           ~4      'I+regret+nothing%2C+except+', !1
          5        CONCAT                                           ~5      ~4, '%0A'
          6        ECHO                                                     ~5
    9     7      > RETURN                                                   <true>
   10     8*     > RETURN                                                   null

End of function myerrorhandler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
239.44 ms | 1396 KiB | 17 Q