3v4l.org

run code in 500+ PHP versions simultaneously
<?php function friendlyDtmDiff($date1, $date2, $length = '', $format = '') { // Create DateTime for diff() $dt1 = new \DateTime($date1); $dt2 = new \DateTime($date2); // Create intervals if ($dt1 < $dt2) { $sign = ''; $interval = $dt1->diff($dt2); } else { $sign = '-'; $interval = $dt2->diff($dt1); } // Output format (minimum 2 digits for upper case formats) $of = ($format < 'a') ? '%02d' : '%d'; // generate output using an array of terms to be imploded $output = array(); // create time components switch ($format) { case 'Y': case 'y': $years = $interval->y; if ($years) $output[] = sprintf("$of years", $years); if ($length != 'l') break; $interval->y = 0; case 'M': case 'm': $months = $interval->y * 12 + $interval->m; if ($months) $output[] = sprintf("$of months", $months); if ($length != 'l') break; $interval->m = $interval->y = 0; case 'D': case 'd': $days = ($interval->y * 12 + $interval->m) * 30 + $interval->d; if ($days) $output[] = sprintf("$of days", $days); if ($length != 'l') break; $interval->d = $interval->m = $interval->y = 0; case 'H': case 'h': $hours = (($interval->y * 12 + $interval->m) * 30 + $interval->d) * 24 + $interval->h; if ($hours) $output[] = sprintf("$of hours", $hours); if ($length != 'l') break; $interval->h = $interval->d = $interval->m = $interval->y = 0; case 'I': case 'i': $minutes = ((($interval->y * 12 + $interval->m) * 30 + $interval->d) * 24 + $interval->h) * 60 + $interval->i; if ($minutes) $output[] = sprintf("$of minutes", $minutes); if ($length != 'l') break; $interval->i = $interval->h = $interval->d = $interval->m = $interval->y = 0; case 'S': case 's': $seconds = (((($interval->y * 12 + $interval->m) * 30 + $interval->d) * 24 + $interval->h) * 60 + $interval->i) * 60 + $interval->s; if ($seconds) $output[] = sprintf("$of seconds", $seconds); break; default: return 'Invalid format'; break; } // put the output string together $last = array_pop($output); return $sign . (count($output) ? implode(', ', $output) . ' and ' : '') . $last; } echo friendlyDtmDiff('2020-02-28 00:00:00', '2020-03-01 12:00:56', '', 'h') . PHP_EOL; echo friendlyDtmDiff('2020-02-28 00:00:00', '2020-03-01 12:00:56', 'l', 'h') . PHP_EOL; echo friendlyDtmDiff('2020-02-28 00:00:00', '2020-03-01 12:08:56', 'l', 'h') . PHP_EOL; echo friendlyDtmDiff('2018-12-28 00:00:00', '2020-04-11 04:08:56', 'l', 'y') . PHP_EOL; echo friendlyDtmDiff('2018-12-28 00:00:00', '2020-04-11 04:08:56', 'l', 'm') . PHP_EOL; echo friendlyDtmDiff('2018-12-28 00:00:00', '2020-04-11 04:08:56', 'l', 'd') . PHP_EOL; echo friendlyDtmDiff('2018-12-28 00:00:00', '2020-04-11 04:08:56', 'l', 'h') . PHP_EOL; echo friendlyDtmDiff('2018-12-28 00:00:00', '2020-04-11 04:08:56', 'l', 'i') . PHP_EOL; echo friendlyDtmDiff('2018-12-28 00:00:00', '2020-04-11 04:08:56', 'l', 's') . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cQr5q
function name:  (null)
number of ops:  73
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   68     0  E >   INIT_FCALL                                                   'friendlydtmdiff'
          1        SEND_VAL                                                     '2020-02-28+00%3A00%3A00'
          2        SEND_VAL                                                     '2020-03-01+12%3A00%3A56'
          3        SEND_VAL                                                     ''
          4        SEND_VAL                                                     'h'
          5        DO_FCALL                                          0  $0      
          6        CONCAT                                               ~1      $0, '%0A'
          7        ECHO                                                         ~1
   69     8        INIT_FCALL                                                   'friendlydtmdiff'
          9        SEND_VAL                                                     '2020-02-28+00%3A00%3A00'
         10        SEND_VAL                                                     '2020-03-01+12%3A00%3A56'
         11        SEND_VAL                                                     'l'
         12        SEND_VAL                                                     'h'
         13        DO_FCALL                                          0  $2      
         14        CONCAT                                               ~3      $2, '%0A'
         15        ECHO                                                         ~3
   70    16        INIT_FCALL                                                   'friendlydtmdiff'
         17        SEND_VAL                                                     '2020-02-28+00%3A00%3A00'
         18        SEND_VAL                                                     '2020-03-01+12%3A08%3A56'
         19        SEND_VAL                                                     'l'
         20        SEND_VAL                                                     'h'
         21        DO_FCALL                                          0  $4      
         22        CONCAT                                               ~5      $4, '%0A'
         23        ECHO                                                         ~5
   71    24        INIT_FCALL                                                   'friendlydtmdiff'
         25        SEND_VAL                                                     '2018-12-28+00%3A00%3A00'
         26        SEND_VAL                                                     '2020-04-11+04%3A08%3A56'
         27        SEND_VAL                                                     'l'
         28        SEND_VAL                                                     'y'
         29        DO_FCALL                                          0  $6      
         30        CONCAT                                               ~7      $6, '%0A'
         31        ECHO                                                         ~7
   72    32        INIT_FCALL                                                   'friendlydtmdiff'
         33        SEND_VAL                                                     '2018-12-28+00%3A00%3A00'
         34        SEND_VAL                                                     '2020-04-11+04%3A08%3A56'
         35        SEND_VAL                                                     'l'
         36        SEND_VAL                                                     'm'
         37        DO_FCALL                                          0  $8      
         38        CONCAT                                               ~9      $8, '%0A'
         39        ECHO                                                         ~9
   73    40        INIT_FCALL                                                   'friendlydtmdiff'
         41        SEND_VAL                                                     '2018-12-28+00%3A00%3A00'
         42        SEND_VAL                                                     '2020-04-11+04%3A08%3A56'
         43        SEND_VAL                                                     'l'
         44        SEND_VAL                                                     'd'
         45        DO_FCALL                                          0  $10     
         46        CONCAT                                               ~11     $10, '%0A'
         47        ECHO                                                         ~11
   74    48        INIT_FCALL                                                   'friendlydtmdiff'
         49        SEND_VAL                                                     '2018-12-28+00%3A00%3A00'
         50        SEND_VAL                                                     '2020-04-11+04%3A08%3A56'
         51        SEND_VAL                                                     'l'
         52        SEND_VAL                                                     'h'
         53        DO_FCALL                                          0  $12     
         54        CONCAT                                               ~13     $12, '%0A'
         55        ECHO                                                         ~13
   75    56        INIT_FCALL                                                   'friendlydtmdiff'
         57        SEND_VAL                                                     '2018-12-28+00%3A00%3A00'
         58        SEND_VAL                                                     '2020-04-11+04%3A08%3A56'
         59        SEND_VAL                                                     'l'
         60        SEND_VAL                                                     'i'
         61        DO_FCALL                                          0  $14     
         62        CONCAT                                               ~15     $14, '%0A'
         63        ECHO                                                         ~15
   76    64        INIT_FCALL                                                   'friendlydtmdiff'
         65        SEND_VAL                                                     '2018-12-28+00%3A00%3A00'
         66        SEND_VAL                                                     '2020-04-11+04%3A08%3A56'
         67        SEND_VAL                                                     'l'
         68        SEND_VAL                                                     's'
         69        DO_FCALL                                          0  $16     
         70        CONCAT                                               ~17     $16, '%0A'
         71        ECHO                                                         ~17
   77    72      > RETURN                                                       1

Function friendlydtmdiff:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
14 jumps found. (Code = 188) Position 1 = 58, Position 2 = 58, Position 3 = 74, Position 4 = 74, Position 5 = 95, Position 6 = 95, Position 7 = 121, Position 8 = 121, Position 9 = 152, Position 10 = 152, Position 11 = 188, Position 12 = 188, Position 13 = 215, Position 14 = 33
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 69
Branch analysis from position: 61
2 jumps found. (Code = 43) Position 1 = 71, Position 2 = 72
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 217
Branch analysis from position: 217
2 jumps found. (Code = 43) Position 1 = 223, Position 2 = 227
Branch analysis from position: 223
1 jumps found. (Code = 42) Position 1 = 228
Branch analysis from position: 228
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 227
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 72
2 jumps found. (Code = 43) Position 1 = 80, Position 2 = 88
Branch analysis from position: 80
2 jumps found. (Code = 43) Position 1 = 90, Position 2 = 91
Branch analysis from position: 90
1 jumps found. (Code = 42) Position 1 = 217
Branch analysis from position: 217
Branch analysis from position: 91
2 jumps found. (Code = 43) Position 1 = 104, Position 2 = 112
Branch analysis from position: 104
2 jumps found. (Code = 43) Position 1 = 114, Position 2 = 115
Branch analysis from position: 114
1 jumps found. (Code = 42) Position 1 = 217
Branch analysis from position: 217
Branch analysis from position: 115
2 jumps found. (Code = 43) Position 1 = 133, Position 2 = 141
Branch analysis from position: 133
2 jumps found. (Code = 43) Position 1 = 143, Position 2 = 144
Branch analysis from position: 143
1 jumps found. (Code = 42) Position 1 = 217
Branch analysis from position: 217
Branch analysis from position: 144
2 jumps found. (Code = 43) Position 1 = 167, Position 2 = 175
Branch analysis from position: 167
2 jumps found. (Code = 43) Position 1 = 177, Position 2 = 178
Branch analysis from position: 177
1 jumps found. (Code = 42) Position 1 = 217
Branch analysis from position: 217
Branch analysis from position: 178
2 jumps found. (Code = 43) Position 1 = 206, Position 2 = 214
Branch analysis from position: 206
1 jumps found. (Code = 42) Position 1 = 217
Branch analysis from position: 217
Branch analysis from position: 214
Branch analysis from position: 175
Branch analysis from position: 141
Branch analysis from position: 112
Branch analysis from position: 88
Branch analysis from position: 69
Branch analysis from position: 58
Branch analysis from position: 74
Branch analysis from position: 74
Branch analysis from position: 95
Branch analysis from position: 95
Branch analysis from position: 121
Branch analysis from position: 121
Branch analysis from position: 152
Branch analysis from position: 152
Branch analysis from position: 188
Branch analysis from position: 188
Branch analysis from position: 215
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 58
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 58
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 74
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 74
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 95
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 95
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 121
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 121
Branch analysis from position: 49
2 jumps found. (Code = 44) Position 1 = 51, Position 2 = 152
Branch analysis from position: 51
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 152
Branch analysis from position: 53
2 jumps found. (Code = 44) Position 1 = 55, Position 2 = 188
Branch analysis from position: 55
2 jumps found. (Code = 44) Position 1 = 57, Position 2 = 188
Branch analysis from position: 57
1 jumps found. (Code = 42) Position 1 = 215
Branch analysis from position: 215
Branch analysis from position: 188
Branch analysis from position: 188
Branch analysis from position: 152
Branch analysis from position: 152
Branch analysis from position: 121
Branch analysis from position: 121
Branch analysis from position: 95
Branch analysis from position: 95
Branch analysis from position: 74
Branch analysis from position: 74
Branch analysis from position: 58
Branch analysis from position: 58
Branch analysis from position: 29
14 jumps found. (Code = 188) Position 1 = 58, Position 2 = 58, Position 3 = 74, Position 4 = 74, Position 5 = 95, Position 6 = 95, Position 7 = 121, Position 8 = 121, Position 9 = 152, Position 10 = 152, Position 11 = 188, Position 12 = 188, Position 13 = 215, Position 14 = 33
Branch analysis from position: 58
Branch analysis from position: 58
Branch analysis from position: 74
Branch analysis from position: 74
Branch analysis from position: 95
Branch analysis from position: 95
Branch analysis from position: 121
Branch analysis from position: 121
Branch analysis from position: 152
Branch analysis from position: 152
Branch analysis from position: 188
Branch analysis from position: 188
Branch analysis from position: 215
Branch analysis from position: 33
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
Branch analysis from position: 29
filename:       /in/cQr5q
function name:  friendlyDtmDiff
number of ops:  232
compiled vars:  !0 = $date1, !1 = $date2, !2 = $length, !3 = $format, !4 = $dt1, !5 = $dt2, !6 = $sign, !7 = $interval, !8 = $of, !9 = $output, !10 = $years, !11 = $months, !12 = $days, !13 = $hours, !14 = $minutes, !15 = $seconds, !16 = $last
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV_INIT                                            !2      ''
          3        RECV_INIT                                            !3      ''
    5     4        NEW                                                  $17     'DateTime'
          5        SEND_VAR_EX                                                  !0
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !4, $17
    6     8        NEW                                                  $20     'DateTime'
          9        SEND_VAR_EX                                                  !1
         10        DO_FCALL                                          0          
         11        ASSIGN                                                       !5, $20
    9    12        IS_SMALLER                                                   !4, !5
         13      > JMPZ                                                         ~23, ->20
   10    14    >   ASSIGN                                                       !6, ''
   11    15        INIT_METHOD_CALL                                             !4, 'diff'
         16        SEND_VAR_EX                                                  !5
         17        DO_FCALL                                          0  $25     
         18        ASSIGN                                                       !7, $25
    9    19      > JMP                                                          ->25
   14    20    >   ASSIGN                                                       !6, '-'
   15    21        INIT_METHOD_CALL                                             !5, 'diff'
         22        SEND_VAR_EX                                                  !4
         23        DO_FCALL                                          0  $28     
         24        ASSIGN                                                       !7, $28
   18    25    >   IS_SMALLER                                                   !3, 'a'
         26      > JMPZ                                                         ~30, ->29
         27    >   QM_ASSIGN                                            ~31     '%2502d'
         28      > JMP                                                          ->30
         29    >   QM_ASSIGN                                            ~31     '%25d'
         30    >   ASSIGN                                                       !8, ~31
   21    31        ASSIGN                                                       !9, <array>
   23    32      > SWITCH_STRING                                                !3, [ 'Y':->58, 'y':->58, 'M':->74, 'm':->74, 'D':->95, 'd':->95, 'H':->121, 'h':->121, 'I':->152, 'i':->152, 'S':->188, 's':->188, ], ->215
   24    33    >   IS_EQUAL                                                     !3, 'Y'
         34      > JMPNZ                                                        ~34, ->58
   25    35    >   IS_EQUAL                                                     !3, 'y'
         36      > JMPNZ                                                        ~34, ->58
   30    37    >   IS_EQUAL                                                     !3, 'M'
         38      > JMPNZ                                                        ~34, ->74
   31    39    >   IS_EQUAL                                                     !3, 'm'
         40      > JMPNZ                                                        ~34, ->74
   36    41    >   IS_EQUAL                                                     !3, 'D'
         42      > JMPNZ                                                        ~34, ->95
   37    43    >   IS_EQUAL                                                     !3, 'd'
         44      > JMPNZ                                                        ~34, ->95
   42    45    >   IS_EQUAL                                                     !3, 'H'
         46      > JMPNZ                                                        ~34, ->121
   43    47    >   IS_EQUAL                                                     !3, 'h'
         48      > JMPNZ                                                        ~34, ->121
   48    49    >   IS_EQUAL                                                     !3, 'I'
         50      > JMPNZ                                                        ~34, ->152
   49    51    >   IS_EQUAL                                                     !3, 'i'
         52      > JMPNZ                                                        ~34, ->152
   54    53    >   IS_EQUAL                                                     !3, 'S'
         54      > JMPNZ                                                        ~34, ->188
   55    55    >   IS_EQUAL                                                     !3, 's'
         56      > JMPNZ                                                        ~34, ->188
         57    > > JMP                                                          ->215
   26    58    >   FETCH_OBJ_R                                          ~35     !7, 'y'
         59        ASSIGN                                                       !10, ~35
   27    60      > JMPZ                                                         !10, ->69
         61    >   INIT_FCALL                                                   'sprintf'
         62        NOP                                                          
         63        FAST_CONCAT                                          ~38     !8, '+years'
         64        SEND_VAL                                                     ~38
         65        SEND_VAR                                                     !10
         66        DO_ICALL                                             $39     
         67        ASSIGN_DIM                                                   !9
         68        OP_DATA                                                      $39
   28    69    >   IS_NOT_EQUAL                                                 !2, 'l'
         70      > JMPZ                                                         ~40, ->72
         71    > > JMP                                                          ->217
   29    72    >   ASSIGN_OBJ                                                   !7, 'y'
         73        OP_DATA                                                      0
   32    74    >   FETCH_OBJ_R                                          ~42     !7, 'y'
         75        MUL                                                  ~43     ~42, 12
         76        FETCH_OBJ_R                                          ~44     !7, 'm'
         77        ADD                                                  ~45     ~43, ~44
         78        ASSIGN                                                       !11, ~45
   33    79      > JMPZ                                                         !11, ->88
         80    >   INIT_FCALL                                                   'sprintf'
         81        NOP                                                          
         82        FAST_CONCAT                                          ~48     !8, '+months'
         83        SEND_VAL                                                     ~48
         84        SEND_VAR                                                     !11
         85        DO_ICALL                                             $49     
         86        ASSIGN_DIM                                                   !9
         87        OP_DATA                                                      $49
   34    88    >   IS_NOT_EQUAL                                                 !2, 'l'
         89      > JMPZ                                                         ~50, ->91
         90    > > JMP                                                          ->217
   35    91    >   ASSIGN_OBJ                                           ~52     !7, 'y'
         92        OP_DATA                                                      0
         93        ASSIGN_OBJ                                                   !7, 'm'
         94        OP_DATA                                                      ~52
   38    95    >   FETCH_OBJ_R                                          ~53     !7, 'y'
         96        MUL                                                  ~54     ~53, 12
         97        FETCH_OBJ_R                                          ~55     !7, 'm'
         98        ADD                                                  ~56     ~54, ~55
         99        MUL                                                  ~57     ~56, 30
        100        FETCH_OBJ_R                                          ~58     !7, 'd'
        101        ADD                                                  ~59     ~57, ~58
        102        ASSIGN                                                       !12, ~59
   39   103      > JMPZ                                                         !12, ->112
        104    >   INIT_FCALL                                                   'sprintf'
        105        NOP                                                          
        106        FAST_CONCAT                                          ~62     !8, '+days'
        107        SEND_VAL                                                     ~62
        108        SEND_VAR                                                     !12
        109        DO_ICALL                                             $63     
        110        ASSIGN_DIM                                                   !9
        111        OP_DATA                                                      $63
   40   112    >   IS_NOT_EQUAL                                                 !2, 'l'
        113      > JMPZ                                                         ~64, ->115
        114    > > JMP                                                          ->217
   41   115    >   ASSIGN_OBJ                                           ~67     !7, 'y'
        116        OP_DATA                                                      0
        117        ASSIGN_OBJ                                           ~66     !7, 'm'
        118        OP_DATA                                                      ~67
        119        ASSIGN_OBJ                                                   !7, 'd'
        120        OP_DATA                                                      ~66
   44   121    >   FETCH_OBJ_R                                          ~68     !7, 'y'
        122        MUL                                                  ~69     ~68, 12
        123        FETCH_OBJ_R                                          ~70     !7, 'm'
        124        ADD                                                  ~71     ~69, ~70
        125        MUL                                                  ~72     ~71, 30
        126        FETCH_OBJ_R                                          ~73     !7, 'd'
        127        ADD                                                  ~74     ~72, ~73
        128        MUL                                                  ~75     ~74, 24
        129        FETCH_OBJ_R                                          ~76     !7, 'h'
        130        ADD                                                  ~77     ~75, ~76
        131        ASSIGN                                                       !13, ~77
   45   132      > JMPZ                                                         !13, ->141
        133    >   INIT_FCALL                                                   'sprintf'
        134        NOP                                                          
        135        FAST_CONCAT                                          ~80     !8, '+hours'
        136        SEND_VAL                                                     ~80
        137        SEND_VAR                                                     !13
        138        DO_ICALL                                             $81     
        139        ASSIGN_DIM                                                   !9
        140        OP_DATA                                                      $81
   46   141    >   IS_NOT_EQUAL                                                 !2, 'l'
        142      > JMPZ                                                         ~82, ->144
        143    > > JMP                                                          ->217
   47   144    >   ASSIGN_OBJ                                           ~86     !7, 'y'
        145        OP_DATA                                                      0
        146        ASSIGN_OBJ                                           ~85     !7, 'm'
        147        OP_DATA                                                      ~86
        148        ASSIGN_OBJ                                           ~84     !7, 'd'
        149        OP_DATA                                                      ~85
        150        ASSIGN_OBJ                                                   !7, 'h'
        151        OP_DATA                                                      ~84
   50   152    >   FETCH_OBJ_R                                          ~87     !7, 'y'
        153        MUL                                                  ~88     ~87, 12
        154        FETCH_OBJ_R                                          ~89     !7, 'm'
        155        ADD                                                  ~90     ~88, ~89
        156        MUL                                                  ~91     ~90, 30
        157        FETCH_OBJ_R                                          ~92     !7, 'd'
        158        ADD                                                  ~93     ~91, ~92
        159        MUL                                                  ~94     ~93, 24
        160        FETCH_OBJ_R                                          ~95     !7, 'h'
        161        ADD                                                  ~96     ~94, ~95
        162        MUL                                                  ~97     ~96, 60
        163        FETCH_OBJ_R                                          ~98     !7, 'i'
        164        ADD                                                  ~99     ~97, ~98
        165        ASSIGN                                                       !14, ~99
   51   166      > JMPZ                                                         !14, ->175
        167    >   INIT_FCALL                                                   'sprintf'
        168        NOP                                                          
        169        FAST_CONCAT                                          ~102    !8, '+minutes'
        170        SEND_VAL                                                     ~102
        171        SEND_VAR                                                     !14
        172        DO_ICALL                                             $103    
        173        ASSIGN_DIM                                                   !9
        174        OP_DATA                                                      $103
   52   175    >   IS_NOT_EQUAL                                                 !2, 'l'
        176      > JMPZ                                                         ~104, ->178
        177    > > JMP                                                          ->217
   53   178    >   ASSIGN_OBJ                                           ~109    !7, 'y'
        179        OP_DATA                                                      0
        180        ASSIGN_OBJ                                           ~108    !7, 'm'
        181        OP_DATA                                                      ~109
        182        ASSIGN_OBJ                                           ~107    !7, 'd'
        183        OP_DATA                                                      ~108
        184        ASSIGN_OBJ                                           ~106    !7, 'h'
        185        OP_DATA                                                      ~107
        186        ASSIGN_OBJ                                                   !7, 'i'
        187        OP_DATA                                                      ~106
   56   188    >   FETCH_OBJ_R                                          ~110    !7, 'y'
        189        MUL                                                  ~111    ~110, 12
        190        FETCH_OBJ_R                                          ~112    !7, 'm'
        191        ADD                                                  ~113    ~111, ~112
        192        MUL                                                  ~114    ~113, 30
        193        FETCH_OBJ_R                                          ~115    !7, 'd'
        194        ADD                                                  ~116    ~114, ~115
        195        MUL                                                  ~117    ~116, 24
        196        FETCH_OBJ_R                                          ~118    !7, 'h'
        197        ADD                                                  ~119    ~117, ~118
        198        MUL                                                  ~120    ~119, 60
        199        FETCH_OBJ_R                                          ~121    !7, 'i'
        200        ADD                                                  ~122    ~120, ~121
        201        MUL                                                  ~123    ~122, 60
        202        FETCH_OBJ_R                                          ~124    !7, 's'
        203        ADD                                                  ~125    ~123, ~124
        204        ASSIGN                                                       !15, ~125
   57   205      > JMPZ                                                         !15, ->214
        206    >   INIT_FCALL                                                   'sprintf'
        207        NOP                                                          
        208        FAST_CONCAT                                          ~128    !8, '+seconds'
        209        SEND_VAL                                                     ~128
        210        SEND_VAR                                                     !15
        211        DO_ICALL                                             $129    
        212        ASSIGN_DIM                                                   !9
        213        OP_DATA                                                      $129
   58   214    > > JMP                                                          ->217
   60   215    > > RETURN                                                       'Invalid+format'
   61   216*       JMP                                                          ->217
   64   217    >   INIT_FCALL                                                   'array_pop'
        218        SEND_REF                                       

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
176.3 ms | 2166 KiB | 24 Q