3v4l.org

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

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

End of function addto

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.38 ms | 1397 KiB | 17 Q