3v4l.org

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

Function result:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OHEGP
function name:  result
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 result

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.66 ms | 1397 KiB | 16 Q