3v4l.org

run code in 300+ PHP versions simultaneously
<?php $serials = [ [ "foo" => "", "bar" => "" ], [ "foo" => "", "bar" => "" ], [ "foo" => "", "bar" => "" ], [ "foo" => "", "bar" => "" ], [ "foo" => "", "bar" => "" ], [ "foo" => "Don't remove ", "bar" => "me!" ] ]; $filteredArray = array_filter ($serials, function ($item) { return !empty(join(array_values($item))); }); var_dump($filteredArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7ApqP
function name:  (null)
number of ops:  11
compiled vars:  !0 = $serials, !1 = $filteredArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   30     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F7ApqP%3A30%240'
   32     4        SEND_VAL                                                 ~3
          5        DO_ICALL                                         $4      
   30     6        ASSIGN                                                   !1, $4
   34     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F7ApqP%3A30%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7ApqP
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   RECV                                             !0      
   31     1        INIT_FCALL                                               'join'
          2        INIT_FCALL                                               'array_values'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                         $2      
          7        BOOL_NOT                                         ~3      $2
          8        BOOL_NOT                                         ~4      ~3
          9      > RETURN                                                   ~4
   32    10*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F7ApqP%3A30%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.14 ms | 1387 KiB | 21 Q