3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_array = [ ["name" => "john", "id" => 4], ["name" => "mark", "id" => 152], ["name" => "Eduard", "id" => 152], ]; $seek = 152; var_export( array_any($my_array, fn($row) => $row['id'] === $seek) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hlCUU
function name:  (null)
number of ops:  12
compiled vars:  !0 = $my_array, !1 = $seek
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, 152
   10     2        INIT_FCALL                                               'var_export'
   11     3        INIT_FCALL_BY_NAME                                       'array_any'
          4        SEND_VAR_EX                                              !0
          5        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          6        BIND_LEXICAL                                             ~4, !1
          7        SEND_VAL_EX                                              ~4
          8        DO_FCALL                                      0  $5      
          9        SEND_VAR                                                 $5
   10    10        DO_ICALL                                                 
   12    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/hlCUU
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $row, !1 = $seek
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        FETCH_DIM_R                                      ~2      !0, 'id'
          3        IS_IDENTICAL                                     ~3      !1, ~2
          4      > RETURN                                                   ~3
          5*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
131.23 ms | 997 KiB | 14 Q