3v4l.org

run code in 500+ 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                              ~2      [0]
   13     4        SEND_VAL                                                     ~2
    7     5        DO_ICALL                                             $3      
          6        ASSIGN                                                       !0, $3
   15     7        INIT_FCALL                                                   'var_dump'
          8        SEND_VAR                                                     !0
          9        DO_ICALL                                                     
         10      > 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/9MLoP
function name:  {closure:/in/9MLoP:7}
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                              ~1      [0]
   12     4        SEND_VAL                                                     ~1
    9     5        DO_ICALL                                             $2      
   12     6        IS_EQUAL                                             ~3      !0, $2
          7      > RETURN                                                       ~3
   13     8*     > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9MLoP
function name:  {closure:{closure:/in/9MLoP:7}:9}
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 Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
217.42 ms | 2732 KiB | 15 Q