3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ [['foo'=>''], ['bar'=>'a']], [['foo'=>'b'], ['bar'=>'c']], [['foo'=>'e'], ['bar'=>'']] ]; $data = array_filter($data, function($x) { return array_filter($x, function($y) { return array_filter($y) == $y; }) == $x; }); var_dump($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9MLoP
function name:  (null)
number of ops:  11
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9MLoP%3A7%240'
   13     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                         $3      
    7     6        ASSIGN                                                   !0, $3
   15     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F9MLoP%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9MLoP
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9MLoP%3A9%241'
   12     4        SEND_VAL                                                 ~1
          5        DO_ICALL                                         $2      
          6        IS_EQUAL                                         ~3      !0, $2
          7      > RETURN                                                   ~3
   13     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F9MLoP%3A7%240

Function %00%7Bclosure%7D%2Fin%2F9MLoP%3A9%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9MLoP
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        IS_EQUAL                                         ~2      !0, $1
          5      > RETURN                                                   ~2
   12     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F9MLoP%3A9%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.57 ms | 1396 KiB | 17 Q