3v4l.org

run code in 500+ PHP versions simultaneously
<?php $list[7362][0]['value'] = 'apple'; $list[7362][1]['value'] = 'orange'; $list[9215][0]['value'] = 'lemon'; $find = 'orange'; var_export( array_find_key( $list, fn($row) => array_any( $row, fn($sub) => $sub['value'] === $find ) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JAkkD
function name:  (null)
number of ops:  24
compiled vars:  !0 = $list, !1 = $find, !2 = $sub
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   FETCH_DIM_W                                          $3      !0, 7362
          1        FETCH_DIM_W                                          $4      $3, 0
          2        ASSIGN_DIM                                                   $4, 'value'
          3        OP_DATA                                                      'apple'
    4     4        FETCH_DIM_W                                          $6      !0, 7362
          5        FETCH_DIM_W                                          $7      $6, 1
          6        ASSIGN_DIM                                                   $7, 'value'
          7        OP_DATA                                                      'orange'
    5     8        FETCH_DIM_W                                          $9      !0, 9215
          9        FETCH_DIM_W                                          $10     $9, 0
         10        ASSIGN_DIM                                                   $10, 'value'
         11        OP_DATA                                                      'lemon'
    7    12        ASSIGN                                                       !1, 'orange'
    9    13        INIT_FCALL                                                   'var_export'
   10    14        INIT_FCALL                                                   'array_find_key'
   11    15        SEND_VAR                                                     !0
   12    16        DECLARE_LAMBDA_FUNCTION                              ~13     [0]
         17        BIND_LEXICAL                                                 ~13, !2
         18        BIND_LEXICAL                                                 ~13, !1
   16    19        SEND_VAL                                                     ~13
   10    20        DO_ICALL                                             $14     
   16    21        SEND_VAR                                                     $14
    9    22        DO_ICALL                                                     
   17    23      > 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/JAkkD
function name:  {closure:/in/JAkkD:12}
number of ops:  11
compiled vars:  !0 = $row, !1 = $sub, !2 = $find
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
          2        BIND_STATIC                                                  !2
          3        INIT_FCALL                                                   'array_any'
   13     4        SEND_VAR                                                     !0
   14     5        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          6        BIND_LEXICAL                                                 ~3, !2
   15     7        SEND_VAL                                                     ~3
   12     8        DO_ICALL                                             $4      
   15     9      > RETURN                                                       $4
   16    10*     > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JAkkD
function name:  {closure:{closure:/in/JAkkD:12}:14}
number of ops:  6
compiled vars:  !0 = $sub, !1 = $find
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
          2        FETCH_DIM_R                                          ~2      !0, 'value'
          3        IS_IDENTICAL                                         ~3      !1, ~2
          4      > RETURN                                                       ~3
   15     5*     > RETURN                                                       null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.98 ms | 1478 KiB | 17 Q