3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getStuff() { $stuff = range(0, 1000); $result = []; foreach ($stuff as $elem) { $result[] = pow($elem, 2); } return $result; } foreach (getStuff() as $stuff) { echo "$stuff\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/7eUUq
function name:  (null)
number of ops:  10
compiled vars:  !0 = $stuff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'getstuff'
          1        DO_FCALL                                      0  $1      
          2      > FE_RESET_R                                       $2      $1, ->8
          3    > > FE_FETCH_R                                               $2, !0, ->8
   18     4    >   NOP                                                      
          5        FAST_CONCAT                                      ~3      !0, '%0A'
          6        ECHO                                                     ~3
   16     7      > JMP                                                      ->3
          8    >   FE_FREE                                                  $2
   19     9      > RETURN                                                   1

Function getstuff:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/7eUUq
function name:  getStuff
number of ops:  18
compiled vars:  !0 = $stuff, !1 = $result, !2 = $elem
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 1000
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    7     5        ASSIGN                                                   !1, <array>
    8     6      > FE_RESET_R                                       $6      !0, ->15
          7    > > FE_FETCH_R                                               $6, !2, ->15
    9     8    >   INIT_FCALL                                               'pow'
          9        SEND_VAR                                                 !2
         10        SEND_VAL                                                 2
         11        DO_ICALL                                         $8      
         12        ASSIGN_DIM                                               !1
         13        OP_DATA                                                  $8
    8    14      > JMP                                                      ->7
         15    >   FE_FREE                                                  $6
   12    16      > RETURN                                                   !1
   13    17*     > RETURN                                                   null

End of function getstuff

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.31 ms | 1399 KiB | 18 Q