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; } var_dump($test); $test2 = unserialize(base64_decode(base64_encode(serialize($test)))); var_dump($test2); echo 'round2' . 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
2 jumps found. (Code = 77) Position 1 = 48, Position 2 = 55
Branch analysis from position: 48
2 jumps found. (Code = 78) Position 1 = 49, Position 2 = 55
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
Branch analysis from position: 26
Branch analysis from position: 12
filename:       /in/GYZnX
function name:  (null)
number of ops:  57
compiled vars:  !0 = $test, !1 = $value, !2 = $key, !3 = $test2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $4      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    9     3        ECHO                                                     'before%0A'
   10     4      > FE_RESET_R                                       $7      !0, ->12
          5    > > FE_FETCH_R                                       ~8      $7, !1, ->12
          6    >   ASSIGN                                                   !2, ~8
   11     7        CONCAT                                           ~10     !2, '+'
          8        CONCAT                                           ~11     ~10, !1
          9        CONCAT                                           ~12     ~11, '%0A'
         10        ECHO                                                     ~12
   10    11      > JMP                                                      ->5
         12    >   FE_FREE                                                  $7
   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                                       $15     !0, ->26
         19    > > FE_FETCH_R                                       ~16     $15, !1, ->26
         20    >   ASSIGN                                                   !2, ~16
   18    21        CONCAT                                           ~18     !2, '+'
         22        CONCAT                                           ~19     ~18, !1
         23        CONCAT                                           ~20     ~19, '%0A'
         24        ECHO                                                     ~20
   17    25      > JMP                                                      ->19
         26    >   FE_FREE                                                  $15
   20    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                                 
   21    30        INIT_FCALL                                               'unserialize'
         31        INIT_FCALL                                               'base64_decode'
         32        INIT_FCALL                                               'base64_encode'
         33        INIT_FCALL                                               'serialize'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                         $22     
         36        SEND_VAR                                                 $22
         37        DO_ICALL                                         $23     
         38        SEND_VAR                                                 $23
         39        DO_ICALL                                         $24     
         40        SEND_VAR                                                 $24
         41        DO_ICALL                                         $25     
         42        ASSIGN                                                   !3, $25
   22    43        INIT_FCALL                                               'var_dump'
         44        SEND_VAR                                                 !3
         45        DO_ICALL                                                 
   23    46        ECHO                                                     'round2%0A'
   24    47      > FE_RESET_R                                       $28     !0, ->55
         48    > > FE_FETCH_R                                       ~29     $28, !1, ->55
         49    >   ASSIGN                                                   !2, ~29
   25    50        CONCAT                                           ~31     !2, '+'
         51        CONCAT                                           ~32     ~31, !1
         52        CONCAT                                           ~33     ~32, '%0A'
         53        ECHO                                                     ~33
   24    54      > JMP                                                      ->48
         55    >   FE_FREE                                                  $28
   26    56      > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.37 ms | 1400 KiB | 23 Q