3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new stdclass; $x->{42} = 1337; $x = (array)$x; var_dump($x); //$x = array("42" => 1337); foreach ($x as $key => $value) { if (!array_key_exists((string)$key, $x)) echo 'wtf'; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 18
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/MTeS7
function name:  (null)
number of ops:  21
compiled vars:  !0 = $x, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'stdclass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    3     3        ASSIGN_OBJ                                               !0, '42'
          4        OP_DATA                                                  1337
    4     5        CAST                                          7  ~7      !0
          6        ASSIGN                                                   !0, ~7
    6     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    9    10      > FE_RESET_R                                       $10     !0, ->19
         11    > > FE_FETCH_R                                       ~11     $10, !1, ->19
         12    >   ASSIGN                                                   !2, ~11
   11    13        CAST                                          6  ~13     !2
         14        ARRAY_KEY_EXISTS                                 ~14     ~13, !0
         15        BOOL_NOT                                         ~15     ~14
         16      > JMPZ                                                     ~15, ->18
   12    17    >   ECHO                                                     'wtf'
    9    18    > > JMP                                                      ->11
         19    >   FE_FREE                                                  $10
   15    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.89 ms | 1395 KiB | 15 Q