3v4l.org

run code in 300+ PHP versions simultaneously
<?php $post_id = array((object) (array( 'post_id' => 140, )), (object) (array( 'post_id' => 141, )), (object) (array( 'post_id' => 142, ))); print_r($post_id); foreach ($post_id as $key => $value) { $result[] = $value->post_id; } print_r($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/geZOB
function name:  (null)
number of ops:  22
compiled vars:  !0 = $post_id, !1 = $value, !2 = $key, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   CAST                                          8  ~4      <array>
          1        INIT_ARRAY                                       ~5      ~4
    6     2        CAST                                          8  ~6      <array>
          3        ADD_ARRAY_ELEMENT                                ~5      ~6
    8     4        CAST                                          8  ~7      <array>
          5        ADD_ARRAY_ELEMENT                                ~5      ~7
    3     6        ASSIGN                                                   !0, ~5
   10     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   11    10      > FE_RESET_R                                       $10     !0, ->17
         11    > > FE_FETCH_R                                       ~11     $10, !1, ->17
         12    >   ASSIGN                                                   !2, ~11
   12    13        FETCH_OBJ_R                                      ~14     !1, 'post_id'
         14        ASSIGN_DIM                                               !3
         15        OP_DATA                                                  ~14
   11    16      > JMP                                                      ->11
         17    >   FE_FREE                                                  $10
   15    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.13 ms | 1395 KiB | 15 Q