3v4l.org

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

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.94 ms | 1397 KiB | 18 Q