3v4l.org

run code in 300+ PHP versions simultaneously
<?php $users = [ [ "name" => "ali", "age" => 22, "score" => 12 ], [ "name" => "hasan", "age" => 32, "score" => 52 ], ]; $filters = [ "name" => "ali", "age" => 22 ]; var_export( array_filter( $users, fn($row) => !array_diff_assoc($filters, $row) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/anr3h
function name:  (null)
number of ops:  12
compiled vars:  !0 = $users, !1 = $filters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   16     1        ASSIGN                                                   !1, <array>
   21     2        INIT_FCALL                                               'var_export'
   22     3        INIT_FCALL                                               'array_filter'
   23     4        SEND_VAR                                                 !0
   24     5        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          6        BIND_LEXICAL                                             ~4, !1
   25     7        SEND_VAL                                                 ~4
   22     8        DO_ICALL                                         $5      
   25     9        SEND_VAR                                                 $5
   21    10        DO_ICALL                                                 
   26    11      > 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/anr3h
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $row, !1 = $filters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'array_diff_assoc'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        BOOL_NOT                                         ~3      $2
          7      > RETURN                                                   ~3
   25     8*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.75 ms | 1000 KiB | 16 Q