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_filter(array_map(function($cart){ if(!empty($cart['order_cart_id'])) { return (int) $cart['order_cart_id']; } else { return NULL; } }, $list));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qvWWM
function name:  (null)
number of ops:  11
compiled vars:  !0 = $list, !1 = $carts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_FCALL                                               'array_filter'
          2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FqvWWM%3A18%240'
   24     4        SEND_VAL                                                 ~3
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                         $5      
   18     9        ASSIGN                                                   !1, $5
   24    10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FqvWWM%3A18%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qvWWM
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $cart
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1        ISSET_ISEMPTY_DIM_OBJ                         1  ~1      !0, 'order_cart_id'
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->8
   20     4    >   FETCH_DIM_R                                      ~3      !0, 'order_cart_id'
          5        CAST                                          4  ~4      ~3
          6      > RETURN                                                   ~4
          7*       JMP                                                      ->9
   22     8    > > RETURN                                                   null
   24     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FqvWWM%3A18%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.08 ms | 1395 KiB | 17 Q