3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(); $arr["1"] = array("type" => "ping", "timestamp" => time(), "targets" => array()); foreach ($arr as $id => $msg) { print(json_encode($arr[$id])); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/oW8TV
function name:  (null)
number of ops:  19
compiled vars:  !0 = $arr, !1 = $msg, !2 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_ARRAY                                       ~5      'ping', 'type'
          2        INIT_FCALL                                               'time'
          3        DO_ICALL                                         $6      
          4        ADD_ARRAY_ELEMENT                                ~5      $6, 'timestamp'
          5        ADD_ARRAY_ELEMENT                                ~5      <array>, 'targets'
          6        ASSIGN_DIM                                               !0, 1
          7        OP_DATA                                                  ~5
    6     8      > FE_RESET_R                                       $7      !0, ->17
          9    > > FE_FETCH_R                                       ~8      $7, !1, ->17
         10    >   ASSIGN                                                   !2, ~8
    7    11        INIT_FCALL                                               'json_encode'
         12        FETCH_DIM_R                                      ~10     !0, !2
         13        SEND_VAL                                                 ~10
         14        DO_ICALL                                         $11     
         15        ECHO                                                     $11
    6    16      > JMP                                                      ->9
         17    >   FE_FREE                                                  $7
    8    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.53 ms | 1386 KiB | 17 Q