3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a1 = [ ['name' => 'mike', 'age' => 18], ['name' => 'james', 'age' => 22], ['name' => 'sarah', 'age' => 35], ['name' => 'ken', 'age' => 29], ]; $a2 = [22, 25, 35, 40]; var_export( array_filter($a1, fn($row) => in_array($row['age'], $a2)) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oKRGn
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a1, !1 = $a2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   10     1        ASSIGN                                                       !1, <array>
   12     2        INIT_FCALL                                                   'var_export'
   13     3        INIT_FCALL                                                   'array_filter'
          4        SEND_VAR                                                     !0
          5        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          6        BIND_LEXICAL                                                 ~4, !1
          7        SEND_VAL                                                     ~4
          8        DO_ICALL                                             $5      
          9        SEND_VAR                                                     $5
   12    10        DO_ICALL                                                     
   14    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/oKRGn
function name:  {closure:/in/oKRGn:13}
number of ops:  6
compiled vars:  !0 = $row, !1 = $a2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
          2        FETCH_DIM_R                                          ~2      !0, 'age'
          3        FRAMELESS_ICALL_2                in_array            ~3      ~2, !1
          4      > RETURN                                                       ~3
          5*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.25 ms | 1883 KiB | 15 Q