3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = Array ( 'Tennis 1' => Array ( 'IntervalTime' => Array ( 'Lun' => Array ( '0' => '10:00', '1' => '11:00', '2' => '12:00', '3' => '13:00', '4' => '14:00', '5' => '15:00', '6' => '16:00', '7' => '17:00', '8' => '18:00', '9' => '19:00', '10' => '20:00' ), 'Mar' => Array ( '0' => '12:00', '1' => '13:00', '2' => '14:00', '3' => '15:00' ), 'Mer' => Array ( '0' => '09:00', '1' => '10:00', '2' => '11:00', '3' => '12:00', '4' => '13:00' ), 'Gio' => Array ( '0' => '09:00', '1' => '10:00', '2' => '11:00', '3' => '12:00', '4' => '13:00' ), 'Ven' => Array ( '0' => '09:00', '1' => '10:00', '2' => '11:00', '3' => '12:00', '4' => '13:00' ), 'Sab' => Array ( '0' => '09:00', '1' => '10:00', '2' => '11:00', '3' => '12:00', '4' => '13:00', '5' => '14:00', '6' => '15:00', '7' => '16:00', '8' => '17:00', '9' => '18:00' ), 'Sun' => Array ( '0' => '09:00', '1' => '10:00', '2' => '11:00', '3' => '12:00', '4' => '13:00', '5' => '14:00', '6' => '15:00', '7' => '16:00', '8' => '17:00', '9' => '18:00' ) ) ) ); $StartTime = "14:00"; $EndTime = "16:30"; array_walk_recursive($a['Tennis 1']['IntervalTime'], function(&$v) use ($StartTime, $EndTime){ if($v >= $StartTime && $v <= $EndTime) $v = false; }); $f['Tennis 1']['IntervalTime'] = array_map('array_filter', $a['Tennis 1']['IntervalTime']); print_r($f);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4tNEM
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $StartTime, !2 = $EndTime, !3 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   90     1        ASSIGN                                                   !1, '14%3A00'
          2        ASSIGN                                                   !2, '16%3A30'
   91     3        INIT_FCALL                                               'array_walk_recursive'
          4        FETCH_DIM_W                                      $7      !0, 'Tennis+1'
          5        FETCH_DIM_W                                      $8      $7, 'IntervalTime'
          6        SEND_REF                                                 $8
          7        DECLARE_LAMBDA_FUNCTION                          ~9      [0]
          8        BIND_LEXICAL                                             ~9, !1
          9        BIND_LEXICAL                                             ~9, !2
   93    10        SEND_VAL                                                 ~9
   91    11        DO_ICALL                                                 
   94    12        INIT_FCALL                                               'array_map'
         13        SEND_VAL                                                 'array_filter'
         14        FETCH_DIM_R                                      ~13     !0, 'Tennis+1'
         15        FETCH_DIM_R                                      ~14     ~13, 'IntervalTime'
         16        SEND_VAL                                                 ~14
         17        DO_ICALL                                         $15     
         18        FETCH_DIM_W                                      $11     !3, 'Tennis+1'
         19        ASSIGN_DIM                                               $11, 'IntervalTime'
         20        OP_DATA                                                  $15
   95    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
         24      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
Branch analysis from position: 7
filename:       /in/4tNEM
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $v, !1 = $StartTime, !2 = $EndTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   91     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
   92     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    > > JMPZ                                                     ~3, ->9
          8    >   ASSIGN                                                   !0, <false>
   93     9    > > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.23 ms | 1007 KiB | 16 Q