3v4l.org

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

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

End of function modify

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
209.64 ms | 1001 KiB | 15 Q