3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "-1" => "item 1", "1" => "item 2", "\0-1" => "item 3", ]; print_r($arr); var_dump($arr); foreach ($arr as $k => $v) { print bin2hex($k) ."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/BMLMI
function name:  (null)
number of ops:  18
compiled vars:  !0 = $arr, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    9     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   10     7      > FE_RESET_R                                       $6      !0, ->16
          8    > > FE_FETCH_R                                       ~7      $6, !1, ->16
          9    >   ASSIGN                                                   !2, ~7
   11    10        INIT_FCALL                                               'bin2hex'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $9      
         13        CONCAT                                           ~10     $9, '%0A'
         14        ECHO                                                     ~10
   10    15      > JMP                                                      ->8
         16    >   FE_FREE                                                  $6
   12    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.05 ms | 1461 KiB | 16 Q