3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dates = array ('24-12-2013', '25-12-2013', '26-12-2014', '27-12-2013'); $start = strtotime('25-12-2013'); $end = strtotime('26-12-2013'); $inDateRange = count( array_filter( $dates, function($value) use($start, $end) { $value = strtotime($value); return ($value >= $start && $value <= $end); } ) ); var_dump($inDateRange);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d0Vkk
function name:  (null)
number of ops:  22
compiled vars:  !0 = $dates, !1 = $start, !2 = $end, !3 = $inDateRange
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'strtotime'
          2        SEND_VAL                                                 '25-12-2013'
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    6     5        INIT_FCALL                                               'strtotime'
          6        SEND_VAL                                                 '26-12-2013'
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !2, $7
    9     9        INIT_FCALL                                               'array_filter'
   10    10        SEND_VAR                                                 !0
   11    11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd0Vkk%3A11%240'
         12        BIND_LEXICAL                                             ~9, !1
         13        BIND_LEXICAL                                             ~9, !2
   14    14        SEND_VAL                                                 ~9
         15        DO_ICALL                                         $10     
         16        COUNT                                            ~11     $10
    8    17        ASSIGN                                                   !3, ~11
   17    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2Fd0Vkk%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.93 ms | 1396 KiB | 19 Q