3v4l.org

run code in 300+ PHP versions simultaneously
<?php $errors = []; set_error_handler( function () use ($errors) { array_push($errors, func_get_args()); } ); var_dump($errors); tigger_error("Example error", E_USER_ERROR); var_dump($errors);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/85UkK
function name:  (null)
number of ops:  17
compiled vars:  !0 = $errors
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'set_error_handler'
    6     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F85UkK%3A6%240'
          3        BIND_LEXICAL                                             ~2, !0
    8     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   11     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   13     9        INIT_FCALL_BY_NAME                                       'tigger_error'
         10        SEND_VAL_EX                                              'Example+error'
         11        SEND_VAL_EX                                              256
         12        DO_FCALL                                      0          
   15    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F85UkK%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/85UkK
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $errors
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_STATIC                                              !0
    7     1        INIT_FCALL                                               'array_push'
          2        SEND_REF                                                 !0
          3        FUNC_GET_ARGS                                    ~1      
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
    8     6      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F85UkK%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.56 ms | 1387 KiB | 19 Q