3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "test!"; $b = "test B!"; function errhnd($errno, $errstr, $errfile, $errline) { # need $a and $b vars here! echo $GLOBALS['a']; echo "\n"; echo $GLOBALS['b']; echo "\n"; echo $errno; echo "\n"; echo $errstr; echo "\n"; echo $errfile; } set_error_handler('errhnd'); fuidaa;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vjj3A
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'test%21'
    4     1        ASSIGN                                                   !1, 'test+B%21'
   19     2        INIT_FCALL                                               'set_error_handler'
          3        SEND_VAL                                                 'errhnd'
          4        DO_ICALL                                                 
   21     5        FETCH_CONSTANT                                   ~5      'fuidaa'
          6        FREE                                                     ~5
          7      > RETURN                                                   1

Function errhnd:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vjj3A
function name:  errhnd
number of ops:  18
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    8     4        FETCH_R                      global              ~4      'GLOBALS'
          5        FETCH_DIM_R                                      ~5      ~4, 'a'
          6        ECHO                                                     ~5
    9     7        ECHO                                                     '%0A'
   10     8        FETCH_R                      global              ~6      'GLOBALS'
          9        FETCH_DIM_R                                      ~7      ~6, 'b'
         10        ECHO                                                     ~7
   11    11        ECHO                                                     '%0A'
   12    12        ECHO                                                     !0
   13    13        ECHO                                                     '%0A'
   14    14        ECHO                                                     !1
   15    15        ECHO                                                     '%0A'
   16    16        ECHO                                                     !2
   17    17      > RETURN                                                   null

End of function errhnd

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.97 ms | 1395 KiB | 15 Q