3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mojaFunkcia() { global $objekt; // v lokálnej premennej $objekt je odkaz (referencia) na $GLOBALS['objekt'] $objekt = (object)32; // do *LOKÁLNEJ* premennej $objekt priradím referenciu na novo vytvorený objekt } $objekt = (object)28; mojaFunkcia(); var_dump($objekt);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/75jd6
function name:  (null)
number of ops:  8
compiled vars:  !0 = $objekt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   CAST                                          8  ~1      28
          1        ASSIGN                                                   !0, ~1
   10     2        INIT_FCALL                                               'mojafunkcia'
          3        DO_FCALL                                      0          
   11     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function mojafunkcia:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/75jd6
function name:  mojaFunkcia
number of ops:  4
compiled vars:  !0 = $objekt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_GLOBAL                                              !0, 'objekt'
    5     1        CAST                                          8  ~1      32
          2        ASSIGN                                                   !0, ~1
    6     3      > RETURN                                                   null

End of function mojafunkcia

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.01 ms | 1397 KiB | 16 Q