3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = '2-3'; $daysDiff = $daysArray['1'] - $daysArray['0']; // если разница в днях оказалась больше трех дней // то подкорректируем дату так: возьмем макс срок и отнимем 3 дня (макс возможный) if ($daysDiff > 3) { $maxDay = max($daysArray); $minDay = $maxDay - self::MAX_DELIVERY_RANGE; $correctedDaysInterval = [$maxDay . '-' . $minDay]; print_r($correctedDaysInterval); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 21
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/NeFd6
function name:  (null)
number of ops:  22
compiled vars:  !0 = $test, !1 = $daysDiff, !2 = $daysArray, !3 = $maxDay, !4 = $minDay, !5 = $correctedDaysInterval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2-3'
    5     1        FETCH_DIM_R                                      ~7      !2, 1
          2        FETCH_DIM_R                                      ~8      !2, 0
          3        SUB                                              ~9      ~7, ~8
          4        ASSIGN                                                   !1, ~9
    9     5        IS_SMALLER                                               3, !1
          6      > JMPZ                                                     ~11, ->21
   10     7    >   INIT_FCALL                                               'max'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $12     
         10        ASSIGN                                                   !3, $12
   11    11        FETCH_CLASS_CONSTANT                             ~14     'MAX_DELIVERY_RANGE'
         12        SUB                                              ~15     !3, ~14
         13        ASSIGN                                                   !4, ~15
   12    14        CONCAT                                           ~17     !3, '-'
         15        CONCAT                                           ~18     ~17, !4
         16        INIT_ARRAY                                       ~19     ~18
         17        ASSIGN                                                   !5, ~19
   14    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !5
         20        DO_ICALL                                                 
   15    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.62 ms | 1395 KiB | 17 Q