3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class hej { function getArray() { $array = [1, 2, 3]; return $array; } } $hej = new hej(); $array = $hej->getArray(); foreach($array as $arr) { print $arr; } // your code goes here
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/Y1WDA
function name:  (null)
number of ops:  12
compiled vars:  !0 = $hej, !1 = $array, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $3      'hej'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   13     3        INIT_METHOD_CALL                                         !0, 'getArray'
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !1, $6
   15     6      > FE_RESET_R                                       $8      !1, ->10
          7    > > FE_FETCH_R                                               $8, !2, ->10
   16     8    >   ECHO                                                     !2
   15     9      > JMP                                                      ->7
         10    >   FE_FREE                                                  $8
   19    11      > RETURN                                                   1

Class hej:
Function getarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y1WDA
function name:  getArray
number of ops:  3
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
    7     1      > RETURN                                                   !0
    8     2*     > RETURN                                                   null

End of function getarray

End of class hej.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.35 ms | 1394 KiB | 13 Q