3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { echo 'X'; print_r( set_error_handler('var_dump') ); restore_error_handler(); } set_error_handler('foo'); foo(); $a = $b;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FE0pk
function name:  (null)
number of ops:  7
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                                                 'foo'
          2        DO_ICALL                                                 
   11     3        INIT_FCALL                                               'foo'
          4        DO_FCALL                                      0          
   13     5        ASSIGN                                                   !0, !1
          6      > RETURN                                                   1

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.46 ms | 1397 KiB | 20 Q