3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dates = array("2013-12-24","2013-12-25","2014-12-24","2013-12-27"); $start = '2013-12-25'; $end = '2013-12-26'; $dates_in_range = array_filter($array, function($date) { global $start; global $end; return (strtotime($date) >= strtotime($start) and strtotime($date) <= strtotime($end)); }); print_r($dates_in_range);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OqKtQ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $dates, !1 = $start, !2 = $end, !3 = $dates_in_range, !4 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, '2013-12-25'
    5     2        ASSIGN                                                   !2, '2013-12-26'
    7     3        INIT_FCALL                                               'array_filter'
          4        SEND_VAR                                                 !4
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FOqKtQ%3A7%240'
   11     6        SEND_VAL                                                 ~8
          7        DO_ICALL                                         $9      
    7     8        ASSIGN                                                   !3, $9
   13     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FOqKtQ%3A7%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/OqKtQ
function name:  {closure}
number of ops:  21
compiled vars:  !0 = $date, !1 = $start, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        BIND_GLOBAL                                              !1, 'start'
    9     2        BIND_GLOBAL                                              !2, 'end'
   10     3        INIT_FCALL                                               'strtotime'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        INIT_FCALL                                               'strtotime'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $4      
          9        IS_SMALLER_OR_EQUAL                              ~5      $4, $3
         10      > JMPZ_EX                                          ~5      ~5, ->19
         11    >   INIT_FCALL                                               'strtotime'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        INIT_FCALL                                               'strtotime'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $7      
         17        IS_SMALLER_OR_EQUAL                              ~8      $6, $7
         18        BOOL                                             ~5      ~8
         19    > > RETURN                                                   ~5
   11    20*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FOqKtQ%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.76 ms | 1388 KiB | 19 Q