3v4l.org

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

Function loaddatabaselabels:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m3cue
function name:  loadDatabaseLabels
number of ops:  5
compiled vars:  !0 = $labels
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN_OBJ                                               !0, 'labels'
          2        OP_DATA                                                  <array>
    6     3      > RETURN                                                   !0
    7     4*     > RETURN                                                   null

End of function loaddatabaselabels

Function getlabel:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m3cue
function name:  getLabel
number of ops:  6
compiled vars:  !0 = $labels
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'var_dump'
          2        FETCH_OBJ_R                                      ~1      !0, 'labels'
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
   11     5      > RETURN                                                   null

End of function getlabel

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.68 ms | 1398 KiB | 17 Q