3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} $foo = new Foo(); $weakMap = new WeakMap(); $weakMap[$foo] = $foo; unset($foo); foreach ($weakMap as $prop => $value) { var_dump($prop, $value); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/mG5L7
function name:  (null)
number of ops:  19
compiled vars:  !0 = $foo, !1 = $weakMap, !2 = $value, !3 = $prop
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $4      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    6     3        NEW                                              $7      'WeakMap'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $7
    7     6        ASSIGN_DIM                                               !1, !0
          7        OP_DATA                                                  !0
    8     8        UNSET_CV                                                 !0
    9     9      > FE_RESET_R                                       $11     !1, ->17
         10    > > FE_FETCH_R                                       ~12     $11, !2, ->17
         11    >   ASSIGN                                                   !3, ~12
   10    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !3
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
    9    16      > JMP                                                      ->10
         17    >   FE_FREE                                                  $11
   11    18      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.83 ms | 1009 KiB | 14 Q