3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dat= array("2020-02-01","2020-02-05","2020-02-10","20-02-12","2020-02-15"); $word= array("Attend To,Explore,Unaided,dull,bad"); //User input $start ="2020-01-01"; $end="2020-02-07"; //Filter out dates between start and end date $result = array_filter($dat, function($data_item) use($start,$end) { return $data_item >= $start && $data_item <= $end; }); $word_result = array_intersect_key(explode(',', $word[0]), $result); print_r($word_result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BI1IC
function name:  (null)
number of ops:  26
compiled vars:  !0 = $dat, !1 = $word, !2 = $start, !3 = $end, !4 = $result, !5 = $word_result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    7     2        ASSIGN                                                   !2, '2020-01-01'
    8     3        ASSIGN                                                   !3, '2020-02-07'
   12     4        INIT_FCALL                                               'array_filter'
          5        SEND_VAR                                                 !0
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FBI1IC%3A12%240'
          7        BIND_LEXICAL                                             ~10, !2
          8        BIND_LEXICAL                                             ~10, !3
   14     9        SEND_VAL                                                 ~10
         10        DO_ICALL                                         $11     
   12    11        ASSIGN                                                   !4, $11
   16    12        INIT_FCALL                                               'array_intersect_key'
         13        INIT_FCALL                                               'explode'
         14        SEND_VAL                                                 '%2C'
         15        FETCH_DIM_R                                      ~13     !1, 0
         16        SEND_VAL                                                 ~13
         17        DO_ICALL                                         $14     
         18        SEND_VAR                                                 $14
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                         $15     
         21        ASSIGN                                                   !5, $15
   18    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !5
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FBI1IC%3A12%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/BI1IC
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $data_item, !1 = $start, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
   13     3        IS_SMALLER_OR_EQUAL                              ~3      !1, !0
          4      > JMPZ_EX                                          ~3      ~3, ->7
          5    >   IS_SMALLER_OR_EQUAL                              ~4      !0, !2
          6        BOOL                                             ~3      ~4
          7    > > RETURN                                                   ~3
   14     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FBI1IC%3A12%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.87 ms | 941 KiB | 22 Q