3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rows = array( "collect_date" => "2014-09-09" ); $date=date("d/m/Y", strtotime($rows['collect_date'])); if ($date==date(("d/m/Y"), strtotime('+1 days')) && $rows['status']=='4') { echo "<span class='label label-danger1'>".$date."</span>"; } elseif ($date==date(("d/m/Y")) && $rows['status']=='4') { echo "<span class='label label-danger'>".$date."</span>"; } elseif ($date==date(("d/m/Y"), strtotime('+2 days')) && $rows['status']=='4') { echo "<span class='label label-warning'>".$date."</span>"; } elseif (strtotime($date) < strtotime('1 day ago') && $rows['status']=='4') { echo "<span class='label label-danger'>".$date."</span>"; } else { echo $date; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 27
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 74
Branch analysis from position: 74
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 46) Position 1 = 32, Position 2 = 35
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 40
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 74
Branch analysis from position: 74
Branch analysis from position: 40
2 jumps found. (Code = 46) Position 1 = 49, Position 2 = 52
Branch analysis from position: 49
2 jumps found. (Code = 43) Position 1 = 53, Position 2 = 57
Branch analysis from position: 53
1 jumps found. (Code = 42) Position 1 = 74
Branch analysis from position: 74
Branch analysis from position: 57
2 jumps found. (Code = 46) Position 1 = 65, Position 2 = 68
Branch analysis from position: 65
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 73
Branch analysis from position: 69
1 jumps found. (Code = 42) Position 1 = 74
Branch analysis from position: 74
Branch analysis from position: 73
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 68
Branch analysis from position: 52
Branch analysis from position: 35
Branch analysis from position: 22
filename:       /in/XXjmn
function name:  (null)
number of ops:  75
compiled vars:  !0 = $rows, !1 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'd%2Fm%2FY'
          3        INIT_FCALL                                               'strtotime'
          4        FETCH_DIM_R                                      ~3      !0, 'collect_date'
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !1, $5
    9    10        INIT_FCALL                                               'date'
         11        SEND_VAL                                                 'd%2Fm%2FY'
         12        INIT_FCALL                                               'strtotime'
         13        SEND_VAL                                                 '%2B1+days'
         14        DO_ICALL                                         $7      
         15        SEND_VAR                                                 $7
         16        DO_ICALL                                         $8      
         17        IS_EQUAL                                         ~9      !1, $8
         18      > JMPZ_EX                                          ~9      ~9, ->22
         19    >   FETCH_DIM_R                                      ~10     !0, 'status'
         20        IS_EQUAL                                         ~11     ~10, '4'
         21        BOOL                                             ~9      ~11
         22    > > JMPZ                                                     ~9, ->27
   11    23    >   CONCAT                                           ~12     '%3Cspan+class%3D%27label+label-danger1%27%3E', !1
         24        CONCAT                                           ~13     ~12, '%3C%2Fspan%3E'
         25        ECHO                                                     ~13
         26      > JMP                                                      ->74
   13    27    >   INIT_FCALL                                               'date'
         28        SEND_VAL                                                 'd%2Fm%2FY'
         29        DO_ICALL                                         $14     
         30        IS_EQUAL                                         ~15     !1, $14
         31      > JMPZ_EX                                          ~15     ~15, ->35
         32    >   FETCH_DIM_R                                      ~16     !0, 'status'
         33        IS_EQUAL                                         ~17     ~16, '4'
         34        BOOL                                             ~15     ~17
         35    > > JMPZ                                                     ~15, ->40
   15    36    >   CONCAT                                           ~18     '%3Cspan+class%3D%27label+label-danger%27%3E', !1
         37        CONCAT                                           ~19     ~18, '%3C%2Fspan%3E'
         38        ECHO                                                     ~19
         39      > JMP                                                      ->74
   17    40    >   INIT_FCALL                                               'date'
         41        SEND_VAL                                                 'd%2Fm%2FY'
         42        INIT_FCALL                                               'strtotime'
         43        SEND_VAL                                                 '%2B2+days'
         44        DO_ICALL                                         $20     
         45        SEND_VAR                                                 $20
         46        DO_ICALL                                         $21     
         47        IS_EQUAL                                         ~22     !1, $21
         48      > JMPZ_EX                                          ~22     ~22, ->52
         49    >   FETCH_DIM_R                                      ~23     !0, 'status'
         50        IS_EQUAL                                         ~24     ~23, '4'
         51        BOOL                                             ~22     ~24
         52    > > JMPZ                                                     ~22, ->57
   19    53    >   CONCAT                                           ~25     '%3Cspan+class%3D%27label+label-warning%27%3E', !1
         54        CONCAT                                           ~26     ~25, '%3C%2Fspan%3E'
         55        ECHO                                                     ~26
         56      > JMP                                                      ->74
   21    57    >   INIT_FCALL                                               'strtotime'
         58        SEND_VAR                                                 !1
         59        DO_ICALL                                         $27     
         60        INIT_FCALL                                               'strtotime'
         61        SEND_VAL                                                 '1+day+ago'
         62        DO_ICALL                                         $28     
         63        IS_SMALLER                                       ~29     $27, $28
         64      > JMPZ_EX                                          ~29     ~29, ->68
         65    >   FETCH_DIM_R                                      ~30     !0, 'status'
         66        IS_EQUAL                                         ~31     ~30, '4'
         67        BOOL                                             ~29     ~31
         68    > > JMPZ                                                     ~29, ->73
   23    69    >   CONCAT                                           ~32     '%3Cspan+class%3D%27label+label-danger%27%3E', !1
         70        CONCAT                                           ~33     ~32, '%3C%2Fspan%3E'
         71        ECHO                                                     ~33
         72      > JMP                                                      ->74
   27    73    >   ECHO                                                     !1
   28    74    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.67 ms | 1404 KiB | 17 Q