3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class hej { static function getArray() { $array = [1, 2, 3]; return $array; } } $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 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/1XCuj
function name:  (null)
number of ops:  9
compiled vars:  !0 = $array, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_STATIC_METHOD_CALL                                  'hej', 'getArray'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
   13     3      > FE_RESET_R                                       $4      !0, ->7
          4    > > FE_FETCH_R                                               $4, !1, ->7
   14     5    >   ECHO                                                     !1
   13     6      > JMP                                                      ->4
          7    >   FE_FREE                                                  $4
   17     8      > RETURN                                                   1

Class hej:
Function getarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1XCuj
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:
150.82 ms | 1394 KiB | 13 Q