3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array( array ( 'nombre_entrada' => 'Entrada General', 'precio_productor' => 250, 'id_funcion' => 907, ), array ( 'nombre_entrada' => 'Entrada General', 'precio_productor' => 300, 'id_funcion' => 907, ), array ( 'nombre_entrada' => 'Entrada General', 'precio_productor' => 350, 'id_funcion' => 907, ), array ( 'nombre_entrada' => '2 entradas x', 'precio_productor' => 400, 'id_funcion' => 907, ) ); $array2 = array( array ( 'precio_productor' => 350, //note array key was moved 'nombre_entrada' => 'Entrada General', 'id_funcion' => 907, ), array ( 'nombre_entrada' => '2 entradas x', 'precio_productor' => 400, 'id_funcion' => 907, ), ); $mssing = array_filter($array1, function($v) use ($array2) { return !in_array($v, $array2); }); var_export($mssing);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DdSf1
function name:  (null)
number of ops:  13
compiled vars:  !0 = $array1, !1 = $array2, !2 = $mssing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   29     1        ASSIGN                                                   !1, <array>
   44     2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          5        BIND_LEXICAL                                             ~5, !1
   46     6        SEND_VAL                                                 ~5
   44     7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
   48     9        INIT_FCALL                                               'var_export'
         10        SEND_VAR                                                 !2
         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/DdSf1
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $v, !1 = $array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   44     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   45     2        INIT_FCALL                                               'in_array'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6        BOOL_NOT                                         ~3      $2
          7      > RETURN                                                   ~3
   46     8*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.35 ms | 1012 KiB | 16 Q