3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private static $list = ['a','b','c','d']; private static $list_item; public static function iterate () { foreach(self::$list as self::$list_item) { var_dump(self::$list_item); } } } Test::iterate();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jLRj9
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_STATIC_METHOD_CALL                                  'Test', 'iterate'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class Test:
Function iterate:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 10
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/jLRj9
function name:  iterate
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'list'
          1      > FE_RESET_R                                       $1      ~0, ->10
          2    > > FE_FETCH_R                                               $1, $2, ->10
          3    >   ASSIGN_STATIC_PROP                                       'list_item'
          4        OP_DATA                                                  $2
   11     5        INIT_FCALL                                               'var_dump'
          6        FETCH_STATIC_PROP_R          unknown             ~4      'list_item'
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                                 
   10     9      > JMP                                                      ->2
         10    >   FE_FREE                                                  $1
   13    11      > RETURN                                                   null

End of function iterate

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.1 ms | 1386 KiB | 15 Q