3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = array( array( 'order_cart_id' => 1, ), array( 'order_cart_id' => 2, ), array( 'order_cart_id' => 3, ), array( 'order_cart_id' => 4, ), ); $carts = array(); foreach($list as $i => $item) { if(!empty($item['order_cart_id'])) { $carts[$i] = (int) $item['order_cart_id']; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/gBpqI
function name:  (null)
number of ops:  15
compiled vars:  !0 = $list, !1 = $carts, !2 = $item, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        ASSIGN                                                   !1, <array>
   20     2      > FE_RESET_R                                       $6      !0, ->13
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->13
          4    >   ASSIGN                                                   !3, ~7
   21     5        ISSET_ISEMPTY_DIM_OBJ                         1  ~9      !2, 'order_cart_id'
          6        BOOL_NOT                                         ~10     ~9
          7      > JMPZ                                                     ~10, ->12
   22     8    >   FETCH_DIM_R                                      ~12     !2, 'order_cart_id'
          9        CAST                                          4  ~13     ~12
         10        ASSIGN_DIM                                               !1, !3
         11        OP_DATA                                                  ~13
   20    12    > > JMP                                                      ->3
         13    >   FE_FREE                                                  $6
   24    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.65 ms | 1394 KiB | 13 Q