3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getArray() { echo "getArray was called.</br>"; return array(1,2,3,4,5,6); } // test for assigning the array return in a variable echo "1st test</br>"; $arr = getArray(); foreach ($arr as $val) { echo $val; } echo "</br></br>2nd test</br>"; // test for getting the array inside the foreach iterator foreach (getArray() as $val) { echo $val; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 8
filename:       /in/7JXi5
function name:  (null)
number of ops:  18
compiled vars:  !0 = $arr, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     '1st+test%3C%2Fbr%3E'
   11     1        INIT_FCALL                                               'getarray'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
   12     4      > FE_RESET_R                                       $4      !0, ->8
          5    > > FE_FETCH_R                                               $4, !1, ->8
   13     6    >   ECHO                                                     !1
   12     7      > JMP                                                      ->5
          8    >   FE_FREE                                                  $4
   16     9        ECHO                                                     '%3C%2Fbr%3E%3C%2Fbr%3E2nd+test%3C%2Fbr%3E'
   18    10        INIT_FCALL                                               'getarray'
         11        DO_FCALL                                      0  $5      
         12      > FE_RESET_R                                       $6      $5, ->16
         13    > > FE_FETCH_R                                               $6, !1, ->16
   19    14    >   ECHO                                                     !1
   18    15      > JMP                                                      ->13
         16    >   FE_FREE                                                  $6
   20    17      > RETURN                                                   1

Function getarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7JXi5
function name:  getArray
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'getArray+was+called.%3C%2Fbr%3E'
    6     1      > RETURN                                                   <array>
    7     2*     > RETURN                                                   null

End of function getarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.52 ms | 1399 KiB | 15 Q