3v4l.org

run code in 300+ PHP versions simultaneously
<?php function testarray() { return null; } foreach ((array)testarray() as $test) { echo 'loop'; var_dump($test); } echo 'end';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/i5qtQ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'testarray'
          1        DO_FCALL                                      0  $1      
          2        CAST                                          7  ~2      $1
          3      > FE_RESET_R                                       $3      ~2, ->10
          4    > > FE_FETCH_R                                               $3, !0, ->10
    8     5    >   ECHO                                                     'loop'
    9     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    7     9      > JMP                                                      ->4
         10    >   FE_FREE                                                  $3
   11    11        ECHO                                                     'end'
         12      > RETURN                                                   1

Function testarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i5qtQ
function name:  testarray
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   null
    5     1*     > RETURN                                                   null

End of function testarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.15 ms | 1397 KiB | 16 Q