3v4l.org

run code in 300+ PHP versions simultaneously
<?php $meuArrayMultidimensional = array(array("campo" => "teste"), array("campo" => "valor qualquer"), array("campo" => "teste")); $search = "teste"; $retorno = array_keys( array_filter( $meuArrayMultidimensional, function ($value) use ($search) { return (stripos($value['campo'], $search) !== false); } ) ); print_r($retorno);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K5YNt
function name:  (null)
number of ops:  16
compiled vars:  !0 = $meuArrayMultidimensional, !1 = $search, !2 = $retorno
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 'teste'
    4     2        INIT_FCALL                                               'array_keys'
    5     3        INIT_FCALL                                               'array_filter'
    6     4        SEND_VAR                                                 !0
    7     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FK5YNt%3A7%240'
          6        BIND_LEXICAL                                             ~5, !1
    9     7        SEND_VAL                                                 ~5
          8        DO_ICALL                                         $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                         $7      
    4    11        ASSIGN                                                   !2, $7
   12    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FK5YNt%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K5YNt
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $value, !1 = $search
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    8     2        INIT_FCALL                                               'stripos'
          3        FETCH_DIM_R                                      ~2      !0, 'campo'
          4        SEND_VAL                                                 ~2
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $3      
          7        TYPE_CHECK                                  1018  ~4      $3
          8      > RETURN                                                   ~4
    9     9*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.97 ms | 1396 KiB | 21 Q