3v4l.org

run code in 300+ PHP versions simultaneously
<?php $criteria = [3 => 2, 63 => 6, 128 => 3]; $allScores = [ 22 => [ ['skill_id' => 3, 'gd_score' => 4], ['skill_id' => 999, 'gd_score' => 9], ['skill_id' => 128, 'gd_score' => 7], ], 23 => [ ['skill_id' => 128, 'gd_score' => 3], ], 24 => [ ['skill_id' => 63, 'gd_score' => 8], ['skill_id' => 3, 'gd_score' => 7], ['skill_id' => 128, 'gd_score' => 9], ], 25 => [ ['skill_id' => 3, 'gd_score' => 7], ['skill_id' => 63, 'gd_score' => 8], ['skill_id' => 128, 'gd_score' => 1], ], 26 => [ ['skill_id' => 3, 'gd_score' => 2], ['skill_id' => 63, 'gd_score' => 6], ['skill_id' => 128, 'gd_score' => 3], ], ]; var_export( array_keys( array_filter( $allScores, fn($scores) => !array_udiff_assoc( $criteria, array_column($scores, 'gd_score', 'skill_id'), fn($cVal, $sVal) => $cVal >= $sVal ) ) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MIOhj
function name:  (null)
number of ops:  17
compiled vars:  !0 = $criteria, !1 = $allScores, !2 = $cVal, !3 = $sVal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
   31     2        INIT_FCALL                                               'var_export'
   32     3        INIT_FCALL                                               'array_keys'
   33     4        INIT_FCALL                                               'array_filter'
   34     5        SEND_VAR                                                 !1
   35     6        DECLARE_LAMBDA_FUNCTION                          ~6      [0]
          7        BIND_LEXICAL                                             ~6, !0
          8        BIND_LEXICAL                                             ~6, !2
          9        BIND_LEXICAL                                             ~6, !3
   40    10        SEND_VAL                                                 ~6
   33    11        DO_ICALL                                         $7      
   40    12        SEND_VAR                                                 $7
   32    13        DO_ICALL                                         $8      
   40    14        SEND_VAR                                                 $8
   31    15        DO_ICALL                                                 
   42    16      > 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/MIOhj
function name:  {closure}
number of ops:  18
compiled vars:  !0 = $scores, !1 = $criteria, !2 = $cVal, !3 = $sVal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
          3        BIND_STATIC                                              !3
          4        INIT_FCALL                                               'array_udiff_assoc'
   36     5        SEND_VAR                                                 !1
   37     6        INIT_FCALL                                               'array_column'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 'gd_score'
          9        SEND_VAL                                                 'skill_id'
         10        DO_ICALL                                         $4      
         11        SEND_VAR                                                 $4
   38    12        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
   39    13        SEND_VAL                                                 ~5
   35    14        DO_ICALL                                         $6      
   39    15        BOOL_NOT                                         ~7      $6
         16      > RETURN                                                   ~7
   40    17*     > 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/MIOhj
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $cVal, !1 = $sVal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        IS_SMALLER_OR_EQUAL                              ~2      !1, !0
          3      > RETURN                                                   ~2
   39     4*     > RETURN                                                   null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.79 ms | 1007 KiB | 18 Q