3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_errorhandler($errno,$errormsg) { global $my_var; $my_var = 0; echo "EROOR: $errormsg\n"; } // set_error_handler("my_errorhandler"); $my_var = str_repeat("A",$my_var[0]->errormsg = "xyz"); echo "ok\n"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Od3Do
function name:  (null)
number of ops:  10
compiled vars:  !0 = $my_var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'str_repeat'
          1        SEND_VAL                                                 'A'
          2        FETCH_DIM_W                                      $1      !0, 0
          3        ASSIGN_OBJ                                       ~2      $1, 'errormsg'
          4        OP_DATA                                                  'xyz'
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
    9     8        ECHO                                                     'ok%0A'
   10     9      > RETURN                                                   1

Function my_errorhandler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Od3Do
function name:  my_errorhandler
number of ops:  9
compiled vars:  !0 = $errno, !1 = $errormsg, !2 = $my_var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        BIND_GLOBAL                                              !2, 'my_var'
    4     3        ASSIGN                                                   !2, 0
    5     4        ROPE_INIT                                     3  ~5      'EROOR%3A+'
          5        ROPE_ADD                                      1  ~5      ~5, !1
          6        ROPE_END                                      2  ~4      ~5, '%0A'
          7        ECHO                                                     ~4
    6     8      > RETURN                                                   null

End of function my_errorhandler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.71 ms | 1386 KiB | 15 Q