3v4l.org

run code in 300+ PHP versions simultaneously
<?php function errorLogger($errno, $errstr, $errfile, $errline, $errcontext) { $errcontext['arg'] = 'bar'; } set_error_handler('errorLogger'); function argByRef(&$arg) { trigger_error('Error', E_USER_WARNING); print_r($arg); } $arg = 'foo'; argByRef($arg);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/epnev
function name:  (null)
number of ops:  8
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'errorLogger'
          2        DO_ICALL                                                 
   13     3        ASSIGN                                                   !0, 'foo'
   14     4        INIT_FCALL                                               'argbyref'
          5        SEND_REF                                                 !0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function errorlogger:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/epnev
function name:  errorLogger
number of ops:  8
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline, !4 = $errcontext
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
    4     5        ASSIGN_DIM                                               !4, 'arg'
          6        OP_DATA                                                  'bar'
    5     7      > RETURN                                                   null

End of function errorlogger

Function argbyref:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/epnev
function name:  argByRef
number of ops:  9
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'trigger_error'
          2        SEND_VAL                                                 'Error'
          3        SEND_VAL                                                 512
          4        DO_ICALL                                                 
   10     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   11     8      > RETURN                                                   null

End of function argbyref

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.22 ms | 1403 KiB | 20 Q