3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Period { protected $start; protected $end; public function __construct($start, $end) { $this->start = $start; $this->end = $end; } public function getStart() { return $this->start; } public function getEnd() { return $this->end; } public function containsTime($time) { return $this->start <= $time && $this->end > $time; } public function containsPeriod(Period $period) { return $this->containsTime($period->getStart()) && $this->containsTime($period->getEnd()); } public function overlaps(Period $period) { return $this->containsTime($period->getStart()) || $this->containsTime($period->getEnd()) || $period->containsTime($this->start); } public function intersect(Period $other) { $ts = $this->start; $os = $other->start; $te = $this->end; $oe = $other->end; if ($this->containsTime($os)) { $start = $os; } else if ($other->containsTime($ts)) { $start = $ts; } else { return null; } if ($this->containsTime($oe)) { $end = $oe; } else if ($other->containsTime($te)) { $end = $te; } else { return null; } return new Period($start, $end); } } class Availability { protected $periods; public function __construct($periods) { $this->periods = $periods; } public function getPeriods(Period $range) { return array_filter($this->periods, function ($period) use ($range) { return $range->intersect($period); }); } } function st($s) { return strtotime($s); } function pd($s1, $s2) { return new Period(st($s1), st($s2)); } function av() { $p = func_get_args(); $p = array_map(function ($p) { return pd($p[0], $p[1]); }, $p); return new Availability($p); } function strPeriod(Period $period) { return date('H:i:s . jS M y', $period->getStart()) . ' -- ' . date('H:i:s . jS M y', $period->getStart()); } function strResults($periods) { return implode(PHP_EOL, array_map('strPeriod', $periods)); } $availabilities = [ av( // Fridays between noon and 6pm ['2018-10-05 12:00:00', '2018-10-05 18:00:00'], ['2018-10-12 12:00:00', '2018-10-12 18:00:00'], ['2018-10-19 12:00:00', '2018-10-19 18:00:00'], ['2018-10-26 12:00:00', '2018-10-26 18:00:00'] ), av( // 15th till 19th full days ['2018-10-15 00:00:00', '2018-10-16 00:00:00'], ['2018-10-16 00:00:00', '2018-10-17 00:00:00'], ['2018-10-17 00:00:00', '2018-10-18 00:00:00'], ['2018-10-18 00:00:00', '2018-10-19 00:00:00'], ['2018-10-19 00:00:00', '2018-10-20 00:00:00'] ), av( // Wed 10th, Fri 19th and Wed 24th between 8am and 2pm ['2018-10-10 08:00:00', '2018-10-10 14:00:00'], ['2018-10-19 08:00:00', '2018-10-19 14:00:00'], ['2018-10-24 08:00:00', '2018-10-24 14:00:00'] ), ]; // Get periods for the whole month of October $periods = [ pd('2018-10-01 00:00:00', '2018-11-01 00:00:00') ]; foreach ($availabilities as $i => $avail) { printf('Availability #%d' . PHP_EOL, $i); echo str_repeat('-', 80) . PHP_EOL; $tPeriods = []; foreach ($periods as $period) { printf(' > Getting available periods in %s'.PHP_EOL, strPeriod($period)); $aPeriods = $avail->getPeriods($period); printf(' > Got %d periods', count($aPeriods)); $tPeriods = array_merge($tPeriods, $aPeriods); } $periods = $tPeriods; } echo str_repeat('=', 80) . PHP_EOL; echo 'RESULTS:' . PHP_EOL; echo strResults($periods);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 29, Position 2 = 69
Branch analysis from position: 29
2 jumps found. (Code = 78) Position 1 = 30, Position 2 = 69
Branch analysis from position: 30
2 jumps found. (Code = 77) Position 1 = 43, Position 2 = 66
Branch analysis from position: 43
2 jumps found. (Code = 78) Position 1 = 44, Position 2 = 66
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
Branch analysis from position: 66
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 66
Branch analysis from position: 69
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 69
filename:       /in/tF3iL
function name:  (null)
number of ops:  82
compiled vars:  !0 = $availabilities, !1 = $periods, !2 = $avail, !3 = $i, !4 = $tPeriods, !5 = $period, !6 = $aPeriods
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  117     0  E >   INIT_FCALL                                               'av'
  119     1        SEND_VAL                                                 <array>
  120     2        SEND_VAL                                                 <array>
  121     3        SEND_VAL                                                 <array>
  122     4        SEND_VAL                                                 <array>
          5        DO_FCALL                                      0  $7      
          6        INIT_ARRAY                                       ~8      $7
  124     7        INIT_FCALL                                               'av'
  126     8        SEND_VAL                                                 <array>
  127     9        SEND_VAL                                                 <array>
  128    10        SEND_VAL                                                 <array>
  129    11        SEND_VAL                                                 <array>
  130    12        SEND_VAL                                                 <array>
         13        DO_FCALL                                      0  $9      
         14        ADD_ARRAY_ELEMENT                                ~8      $9
  132    15        INIT_FCALL                                               'av'
  134    16        SEND_VAL                                                 <array>
  135    17        SEND_VAL                                                 <array>
  136    18        SEND_VAL                                                 <array>
         19        DO_FCALL                                      0  $10     
         20        ADD_ARRAY_ELEMENT                                ~8      $10
  116    21        ASSIGN                                                   !0, ~8
  142    22        INIT_FCALL                                               'pd'
         23        SEND_VAL                                                 '2018-10-01+00%3A00%3A00'
         24        SEND_VAL                                                 '2018-11-01+00%3A00%3A00'
         25        DO_FCALL                                      0  $12     
         26        INIT_ARRAY                                       ~13     $12
  141    27        ASSIGN                                                   !1, ~13
  145    28      > FE_RESET_R                                       $15     !0, ->69
         29    > > FE_FETCH_R                                       ~16     $15, !2, ->69
         30    >   ASSIGN                                                   !3, ~16
  146    31        INIT_FCALL                                               'printf'
         32        SEND_VAL                                                 'Availability+%23%25d%0A'
         33        SEND_VAR                                                 !3
         34        DO_ICALL                                                 
  147    35        INIT_FCALL                                               'str_repeat'
         36        SEND_VAL                                                 '-'
         37        SEND_VAL                                                 80
         38        DO_ICALL                                         $19     
         39        CONCAT                                           ~20     $19, '%0A'
         40        ECHO                                                     ~20
  149    41        ASSIGN                                                   !4, <array>
  150    42      > FE_RESET_R                                       $22     !1, ->66
         43    > > FE_FETCH_R                                               $22, !5, ->66
  151    44    >   INIT_FCALL                                               'printf'
         45        SEND_VAL                                                 '++%3E+Getting+available+periods+in+%25s%0A'
         46        INIT_FCALL                                               'strperiod'
         47        SEND_VAR                                                 !5
         48        DO_FCALL                                      0  $23     
         49        SEND_VAR                                                 $23
         50        DO_ICALL                                                 
  153    51        INIT_METHOD_CALL                                         !2, 'getPeriods'
         52        SEND_VAR_EX                                              !5
         53        DO_FCALL                                      0  $25     
         54        ASSIGN                                                   !6, $25
  155    55        INIT_FCALL                                               'printf'
         56        SEND_VAL                                                 '++%3E+Got+%25d+periods'
         57        COUNT                                            ~27     !6
         58        SEND_VAL                                                 ~27
         59        DO_ICALL                                                 
  157    60        INIT_FCALL                                               'array_merge'
         61        SEND_VAR                                                 !4
         62        SEND_VAR                                                 !6
         63        DO_ICALL                                         $29     
         64        ASSIGN                                                   !4, $29
  150    65      > JMP                                                      ->43
         66    >   FE_FREE                                                  $22
  159    67        ASSIGN                                                   !1, !4
  145    68      > JMP                                                      ->29
         69    >   FE_FREE                                                  $15
  162    70        INIT_FCALL                                               'str_repeat'
         71        SEND_VAL                                                 '%3D'
         72        SEND_VAL                                                 80
         73        DO_ICALL                                         $32     
         74        CONCAT                                           ~33     $32, '%0A'
         75        ECHO                                                     ~33
  163    76        ECHO                                                     'RESULTS%3A%0A'
  164    77        INIT_FCALL                                               'strresults'
         78        SEND_VAR                                                 !1
         79        DO_FCALL                                      0  $34     
         80        ECHO                                                     $34
         81      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FtF3iL%3A80%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $period, !1 = $range
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   80     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   81     2        INIT_METHOD_CALL                                         !1, 'intersect'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5      > RETURN                                                   $2
   82     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtF3iL%3A80%240

Function st:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  st
number of ops:  6
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   86     0  E >   RECV                                             !0      
   88     1        INIT_FCALL                                               'strtotime'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   89     5*     > RETURN                                                   null

End of function st

Function pd:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  pd
number of ops:  14
compiled vars:  !0 = $s1, !1 = $s2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   91     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   93     2        NEW                                              $2      'Period'
          3        INIT_FCALL                                               'st'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $3      
          6        SEND_VAR_NO_REF_EX                                       $3
          7        INIT_FCALL                                               'st'
          8        SEND_VAR                                                 !1
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR_NO_REF_EX                                       $4
         11        DO_FCALL                                      0          
         12      > RETURN                                                   $2
   94    13*     > RETURN                                                   null

End of function pd

Function av:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  av
number of ops:  13
compiled vars:  !0 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   98     0  E >   FUNC_GET_ARGS                                    ~1      
          1        ASSIGN                                                   !0, ~1
   99     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtF3iL%3A99%241'
  101     4        SEND_VAL                                                 ~3
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
   99     7        ASSIGN                                                   !0, $4
  103     8        NEW                                              $6      'Availability'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
         11      > RETURN                                                   $6
  104    12*     > RETURN                                                   null

End of function av

Function %00%7Bclosure%7D%2Fin%2FtF3iL%3A99%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   99     0  E >   RECV                                             !0      
  100     1        INIT_FCALL                                               'pd'
          2        FETCH_DIM_R                                      ~1      !0, 0
          3        SEND_VAL                                                 ~1
          4        FETCH_DIM_R                                      ~2      !0, 1
          5        SEND_VAL                                                 ~2
          6        DO_FCALL                                      0  $3      
          7      > RETURN                                                   $3
  101     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtF3iL%3A99%241

Function strperiod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  strPeriod
number of ops:  17
compiled vars:  !0 = $period
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  106     0  E >   RECV                                             !0      
  108     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'H%3Ai%3As+.+jS+M+y'
          3        INIT_METHOD_CALL                                         !0, 'getStart'
          4        DO_FCALL                                      0  $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                         $2      
          7        CONCAT                                           ~3      $2, '+--+'
          8        INIT_FCALL                                               'date'
          9        SEND_VAL                                                 'H%3Ai%3As+.+jS+M+y'
         10        INIT_METHOD_CALL                                         !0, 'getStart'
         11        DO_FCALL                                      0  $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                         $5      
         14        CONCAT                                           ~6      ~3, $5
         15      > RETURN                                                   ~6
  109    16*     > RETURN                                                   null

End of function strperiod

Function strresults:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  strResults
number of ops:  11
compiled vars:  !0 = $periods
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  111     0  E >   RECV                                             !0      
  113     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%0A'
          3        INIT_FCALL                                               'array_map'
          4        SEND_VAL                                                 'strPeriod'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $1      
          7        SEND_VAR                                                 $1
          8        DO_ICALL                                         $2      
          9      > RETURN                                                   $2
  114    10*     > RETURN                                                   null

End of function strresults

Class Period:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  __construct
number of ops:  7
compiled vars:  !0 = $start, !1 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        ASSIGN_OBJ                                               'start'
          3        OP_DATA                                                  !0
   11     4        ASSIGN_OBJ                                               'end'
          5        OP_DATA                                                  !1
   12     6      > RETURN                                                   null

End of function __construct

Function getstart:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  getStart
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_OBJ_R                                      ~0      'start'
          1      > RETURN                                                   ~0
   17     2*     > RETURN                                                   null

End of function getstart

Function getend:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  getEnd
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   FETCH_OBJ_R                                      ~0      'end'
          1      > RETURN                                                   ~0
   22     2*     > RETURN                                                   null

End of function getend

Function containstime:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/tF3iL
function name:  containsTime
number of ops:  9
compiled vars:  !0 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   26     1        FETCH_OBJ_R                                      ~1      'start'
          2        IS_SMALLER_OR_EQUAL                              ~2      ~1, !0
          3      > JMPZ_EX                                          ~2      ~2, ->7
          4    >   FETCH_OBJ_R                                      ~3      'end'
          5        IS_SMALLER                                       ~4      !0, ~3
          6        BOOL                                             ~2      ~4
          7    > > RETURN                                                   ~2
   27     8*     > RETURN                                                   null

End of function containstime

Function containsperiod:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/tF3iL
function name:  containsPeriod
number of ops:  15
compiled vars:  !0 = $period
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   RECV                                             !0      
   31     1        INIT_METHOD_CALL                                         'containsTime'
          2        INIT_METHOD_CALL                                         !0, 'getStart'
          3        DO_FCALL                                      0  $1      
          4        SEND_VAR_NO_REF_EX                                       $1
          5        DO_FCALL                                      0  $2      
          6      > JMPZ_EX                                          ~3      $2, ->13
   32     7    >   INIT_METHOD_CALL                                         'containsTime'
          8        INIT_METHOD_CALL                                         !0, 'getEnd'
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR_NO_REF_EX                                       $4
         11        DO_FCALL                                      0  $5      
         12        BOOL                                             ~3      $5
         13    > > RETURN                                                   ~3
   33    14*     > RETURN                                                   null

End of function containsperiod

Function overlaps:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 47) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 13
filename:       /in/tF3iL
function name:  overlaps
number of ops:  22
compiled vars:  !0 = $period
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   RECV                                             !0      
   37     1        INIT_METHOD_CALL                                         'containsTime'
          2        INIT_METHOD_CALL                                         !0, 'getStart'
          3        DO_FCALL                                      0  $1      
          4        SEND_VAR_NO_REF_EX                                       $1
          5        DO_FCALL                                      0  $2      
          6      > JMPNZ_EX                                         ~3      $2, ->13
   38     7    >   INIT_METHOD_CALL                                         'containsTime'
          8        INIT_METHOD_CALL                                         !0, 'getEnd'
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR_NO_REF_EX                                       $4
         11        DO_FCALL                                      0  $5      
         12        BOOL                                             ~3      $5
         13    > > JMPNZ_EX                                         ~3      ~3, ->20
   39    14    >   INIT_METHOD_CALL                                         !0, 'containsTime'
         15        CHECK_FUNC_ARG                                           
         16        FETCH_OBJ_FUNC_ARG                               $6      'start'
         17        SEND_FUNC_ARG                                            $6
         18        DO_FCALL                                      0  $7      
         19        BOOL                                             ~3      $7
         20    > > RETURN                                                   ~3
   40    21*     > RETURN                                                   null

End of function overlaps

Function intersect:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  intersect
number of ops:  41
compiled vars:  !0 = $other, !1 = $ts, !2 = $os, !3 = $te, !4 = $oe, !5 = $start, !6 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   RECV                                             !0      
   44     1        FETCH_OBJ_R                                      ~7      'start'
          2        ASSIGN                                                   !1, ~7
   45     3        FETCH_OBJ_R                                      ~9      !0, 'start'
          4        ASSIGN                                                   !2, ~9
   46     5        FETCH_OBJ_R                                      ~11     'end'
          6        ASSIGN                                                   !3, ~11
   47     7        FETCH_OBJ_R                                      ~13     !0, 'end'
          8        ASSIGN                                                   !4, ~13
   49     9        INIT_METHOD_CALL                                         'containsTime'
         10        SEND_VAR_EX                                              !2
         11        DO_FCALL                                      0  $15     
         12      > JMPZ                                                     $15, ->15
   50    13    >   ASSIGN                                                   !5, !2
         14      > JMP                                                      ->22
   51    15    >   INIT_METHOD_CALL                                         !0, 'containsTime'
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0  $17     
         18      > JMPZ                                                     $17, ->21
   52    19    >   ASSIGN                                                   !5, !1
         20      > JMP                                                      ->22
   54    21    > > RETURN                                                   null
   57    22    >   INIT_METHOD_CALL                                         'containsTime'
         23        SEND_VAR_EX                                              !4
         24        DO_FCALL                                      0  $19     
         25      > JMPZ                                                     $19, ->28
   58    26    >   ASSIGN                                                   !6, !4
         27      > JMP                                                      ->35
   59    28    >   INIT_METHOD_CALL                                         !0, 'containsTime'
         29        SEND_VAR_EX                                              !3
         30        DO_FCALL                                      0  $21     
         31      > JMPZ                                                     $21, ->34
   60    32    >   ASSIGN                                                   !6, !3
         33      > JMP                                                      ->35
   62    34    > > RETURN                                                   null
   65    35    >   NEW                                              $23     'Period'
         36        SEND_VAR_EX                                              !5
         37        SEND_VAR_EX                                              !6
         38        DO_FCALL                                      0          
         39      > RETURN                                                   $23
   66    40*     > RETURN                                                   null

End of function intersect

End of class Period.

Class Availability:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  __construct
number of ops:  4
compiled vars:  !0 = $periods
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   73     0  E >   RECV                                             !0      
   75     1        ASSIGN_OBJ                                               'periods'
          2        OP_DATA                                                  !0
   76     3      > RETURN                                                   null

End of function __construct

Function getperiods:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tF3iL
function name:  getPeriods
number of ops:  10
compiled vars:  !0 = $range
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   78     0  E >   RECV                                             !0      
   80     1        INIT_FCALL                                               'array_filter'
          2        FETCH_OBJ_R                                      ~1      'periods'
          3        SEND_VAL                                                 ~1
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtF3iL%3A80%240'
          5        BIND_LEXICAL                                             ~2, !0
   82     6        SEND_VAL                                                 ~2
          7        DO_ICALL                                         $3      
          8      > RETURN                                                   $3
   83     9*     > RETURN                                                   null

End of function getperiods

End of class Availability.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.25 ms | 1427 KiB | 38 Q