3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array('foo' => array('bar')); function foo() { return array('bar'); } var_dump(key(foo()));
based on vjbt9
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/NGsPl
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, <array>
   3     1        NOP                                                      
   6     2        INIT_FCALL                                               'var_dump'
         3        INIT_FCALL                                               'key'
         4        INIT_FCALL                                               'foo'
         5        DO_FCALL                                      0  $2      
         6        SEND_VAR                                                 $2
         7        DO_ICALL                                         $3      
         8        SEND_VAR                                                 $3
         9        DO_ICALL                                                 
        10      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/NGsPl
function name:  foo
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E > > RETURN                                                   <array>
   5     1*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 7.1.0