3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { set_error_handler(function ($errno, $errstr, $errfile, $errline, $context = null) { var_dump($context); }); $a = 1; $$a = 2; $x++; // generates error } test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BR04H
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'test'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BR04H
function name:  test
number of ops:  9
compiled vars:  !0 = $a, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
    6     2        SEND_VAL                                                 ~2
    4     3        DO_ICALL                                                 
    8     4        ASSIGN                                                   !0, 1
    9     5        FETCH_W                      local               $5      !0
          6        ASSIGN                                                   $5, 2
   11     7        PRE_INC                                                  !1
   12     8      > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BR04H
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline, !4 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV_INIT                                        !4      null
    5     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !4
          7        DO_ICALL                                                 
    6     8      > RETURN                                                   null

End of Dynamic Function 0

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.52 ms | 1003 KiB | 16 Q