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"; return null; } set_error_handler("my_errorhandler"); var_dump($my_var[0]->errormsg = "xyz"); $my_var = str_repeat("A",$my_var[0]->errormsg = "xyz"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s0Kcm
function name:  (null)
number of ops:  18
compiled vars:  !0 = $my_var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'my_errorhandler'
          2        DO_ICALL                                                 
    9     3        INIT_FCALL                                               'var_dump'
          4        FETCH_DIM_W                                      $2      !0, 0
          5        ASSIGN_OBJ                                       ~3      $2, 'errormsg'
          6        OP_DATA                                                  'xyz'
          7        SEND_VAL                                                 ~3
          8        DO_ICALL                                                 
   10     9        INIT_FCALL                                               'str_repeat'
         10        SEND_VAL                                                 'A'
         11        FETCH_DIM_W                                      $5      !0, 0
         12        ASSIGN_OBJ                                       ~6      $5, 'errormsg'
         13        OP_DATA                                                  'xyz'
         14        SEND_VAL                                                 ~6
         15        DO_ICALL                                         $7      
         16        ASSIGN                                                   !0, $7
   12    17      > RETURN                                                   1

Function my_errorhandler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s0Kcm
function name:  my_errorhandler
number of ops:  10
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
    7     9*     > RETURN                                                   null

End of function my_errorhandler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.62 ms | 1396 KiB | 19 Q