3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrIncome = [ [ 'date' => '01-01-2019', 'total' => '500', ], [ 'date' => '02-01-2019', 'total' => '200', ], [ 'date' => '03-01-2019', 'total' => '300', ], [ 'date' => '04-01-2019', 'total' => '900', ], ]; $arrExpense= [ [ 'date' => '01-01-2019', 'total' => '50', ], [ 'date' => '02-01-2019', 'total' => '60', ], [ 'date' => '07-01-2019', 'total' => '25', ], [ 'date' => '08-01-2019', 'total' => '50', ], ]; $arrExpense = array_filter($arrExpense, function ($v) use ($arrIncome) { return !in_array($v['date'], array_column($arrIncome, 'date')); }); print_r($arrExpense);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2Gvg0
function name:  (null)
number of ops:  13
compiled vars:  !0 = $arrIncome, !1 = $arrExpense
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   21     1        ASSIGN                                                   !1, <array>
   39     2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !1
          4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          5        BIND_LEXICAL                                             ~4, !0
   41     6        SEND_VAL                                                 ~4
   39     7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
   42     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2Gvg0
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $v, !1 = $arrIncome
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   40     2        INIT_FCALL                                               'in_array'
          3        FETCH_DIM_R                                      ~2      !0, 'date'
          4        SEND_VAL                                                 ~2
          5        INIT_FCALL                                               'array_column'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 'date'
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                         $4      
         11        BOOL_NOT                                         ~5      $4
         12      > RETURN                                                   ~5
   41    13*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.97 ms | 1075 KiB | 17 Q