3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Test { public $a; public int $b; } $test = new Test; foreach ($test as $prop => &$value) { $value = 42; } var_dump($test);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
2 jumps found. (Code = 126) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/EKvdF
function name:  (null)
number of ops:  13
compiled vars:  !0 = $test, !1 = $value, !2 = $prop
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   NEW                                                  $3      'Test'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $3
   10     3      > FE_RESET_RW                                          $6      !0, ->8
          4    > > FE_FETCH_RW                                          ~7      $6, !1, ->8
          5    >   ASSIGN                                                       !2, ~7
   11     6        ASSIGN                                                       !1, 42
   10     7      > JMP                                                          ->4
          8    >   FE_FREE                                                      $6
   14     9        INIT_FCALL                                                   'var_dump'
         10        SEND_VAR                                                     !0
         11        DO_ICALL                                                     
         12      > RETURN                                                       1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
135.01 ms | 476 KiB | 8 Q