3v4l.org

run code in 300+ PHP versions simultaneously
<?php $b = 5; function f1 () { global $a; $a = 4; $b = 3; $c = 2; f2(); } function f2 () { global $a, $b, $c; var_dump($a); var_dump($b); var_dump($c); } f1();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/14JmP
function name:  (null)
number of ops:  4
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 5
   20     1        INIT_FCALL                                               'f1'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function f1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/14JmP
function name:  f1
number of ops:  7
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_GLOBAL                                              !0, 'a'
    7     1        ASSIGN                                                   !0, 4
    8     2        ASSIGN                                                   !1, 3
    9     3        ASSIGN                                                   !2, 2
   10     4        INIT_FCALL_BY_NAME                                       'f2'
          5        DO_FCALL                                      0          
   11     6      > RETURN                                                   null

End of function f1

Function f2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/14JmP
function name:  f2
number of ops:  13
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   BIND_GLOBAL                                              !0, 'a'
          1        BIND_GLOBAL                                              !1, 'b'
          2        BIND_GLOBAL                                              !2, 'c'
   15     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   16     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   17     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
   18    12      > RETURN                                                   null

End of function f2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.52 ms | 1003 KiB | 15 Q