3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test() { $ret = [ "foo" => "bar", "bar" => "baz", "baz" => "qux" ]; $ret['bar'] = 2; return $ret; } list($foo, $bar, $baz) = test(); var_dump($foo, $bar, $baz);
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/qhKMl
function name:  (null)
number of ops:  16
compiled vars:  !0 = $foo, !1 = $bar, !2 = $baz
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  14     1        INIT_FCALL                                               'test'
         2        DO_FCALL                                      0  $3      
         3        FETCH_LIST                                       $4      $3, 0
         4        ASSIGN                                                   !0, $4
         5        FETCH_LIST                                       $6      $3, 1
         6        ASSIGN                                                   !1, $6
         7        FETCH_LIST                                       $8      $3, 2
         8        ASSIGN                                                   !2, $8
         9        FREE                                                     $3
  15    10        INIT_FCALL                                               'var_dump'
        11        SEND_VAR                                                 !0
        12        SEND_VAR                                                 !1
        13        SEND_VAR                                                 !2
        14        DO_ICALL                                                 
        15      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/qhKMl
function name:  test
number of ops:  5
compiled vars:  !0 = $ret
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   ASSIGN                                                   !0, <array>
  10     1        ASSIGN_DIM                                               !0, 'bar'
         2        OP_DATA                                                  2
  11     3      > RETURN                                                   !0
  12     4*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 7.3.0