3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $test = ''; } $test = new Test(); echo 'before' . PHP_EOL; foreach ($test as $key => $value) { echo $key . ' ' . $value . PHP_EOL; } $test->testing = 'testing'; $test->_testing = 'testing2'; echo 'after' . PHP_EOL; foreach ($test as $key => $value) { echo $key . ' ' . $value . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 26
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 12
filename:       /in/0iPE9
function name:  (null)
number of ops:  28
compiled vars:  !0 = $test, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $3      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    9     3        ECHO                                                     'before%0A'
   10     4      > FE_RESET_R                                       $6      !0, ->12
          5    > > FE_FETCH_R                                       ~7      $6, !1, ->12
          6    >   ASSIGN                                                   !2, ~7
   11     7        CONCAT                                           ~9      !2, '+'
          8        CONCAT                                           ~10     ~9, !1
          9        CONCAT                                           ~11     ~10, '%0A'
         10        ECHO                                                     ~11
   10    11      > JMP                                                      ->5
         12    >   FE_FREE                                                  $6
   13    13        ASSIGN_OBJ                                               !0, 'testing'
         14        OP_DATA                                                  'testing'
   14    15        ASSIGN_OBJ                                               !0, '_testing'
         16        OP_DATA                                                  'testing2'
   16    17        ECHO                                                     'after%0A'
   17    18      > FE_RESET_R                                       $14     !0, ->26
         19    > > FE_FETCH_R                                       ~15     $14, !1, ->26
         20    >   ASSIGN                                                   !2, ~15
   18    21        CONCAT                                           ~17     !2, '+'
         22        CONCAT                                           ~18     ~17, !1
         23        CONCAT                                           ~19     ~18, '%0A'
         24        ECHO                                                     ~19
   17    25      > JMP                                                      ->19
         26    >   FE_FREE                                                  $14
   19    27      > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
132.91 ms | 1399 KiB | 13 Q