3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = ["1549440811" => 1, "1549448226" => 2, "1551108588" => 3 ]; $range = "1549460338"; $filtered = array_filter( $arr, function ($key) use ($range) { return $range > $key; }, ARRAY_FILTER_USE_KEY ); print_r($filtered);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qoLhr
function name:  (null)
number of ops:  14
compiled vars:  !0 = $arr, !1 = $range, !2 = $filtered
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, '1549460338'
    6     2        INIT_FCALL                                                   'array_filter'
    7     3        SEND_VAR                                                     !0
    8     4        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
          5        BIND_LEXICAL                                                 ~5, !1
   10     6        SEND_VAL                                                     ~5
   11     7        SEND_VAL                                                     2
    6     8        DO_ICALL                                             $6      
          9        ASSIGN                                                       !2, $6
   15    10        INIT_FCALL                                                   'print_r'
         11        SEND_VAR                                                     !2
         12        DO_ICALL                                                     
         13      > 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/qoLhr
function name:  {closure:/in/qoLhr:8}
number of ops:  5
compiled vars:  !0 = $key, !1 = $range
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
    9     2        IS_SMALLER                                           ~2      !0, !1
          3      > RETURN                                                       ~2
   10     4*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
129.07 ms | 2013 KiB | 15 Q