3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bar($t, $m) { echo $m;} function foo() { echo 'X'; restore_error_handler(); $a = $c; } set_error_handler(array('bar','too')); set_error_handler('foo'); $a = $b; print_r( set_error_handler('var_dump') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7Sa0H
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                                 
   11     3        INIT_FCALL                                               'set_error_handler'
          4        SEND_VAL                                                 'foo'
          5        DO_ICALL                                                 
   13     6        ASSIGN                                                   !0, !1
   15     7        INIT_FCALL                                               'print_r'
          8        INIT_FCALL                                               'set_error_handler'
          9        SEND_VAL                                                 'var_dump'
         10        DO_ICALL                                         $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7Sa0H
function name:  bar
number of ops:  4
compiled vars:  !0 = $t, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        ECHO                                                     !1
          3      > RETURN                                                   null

End of function bar

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7Sa0H
function name:  foo
number of ops:  5
compiled vars:  !0 = $a, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'X'
    6     1        INIT_FCALL                                               'restore_error_handler'
          2        DO_ICALL                                                 
    7     3        ASSIGN                                                   !0, !1
    8     4      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.44 ms | 1396 KiB | 19 Q