3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Workaround for PHP < 5.3.0 */ if(!function_exists('date_diff2')) { class DateInterval1 { public $y; public $m; public $d; public $h; public $i; public $s; public $invert; public $days; public function format($format) { $format = str_replace('%R%y', ($this->invert ? '-' : '+') . $this->y, $format); $format = str_replace('%R%m', ($this->invert ? '-' : '+') . $this->m, $format); $format = str_replace('%R%d', ($this->invert ? '-' : '+') . $this->d, $format); $format = str_replace('%R%h', ($this->invert ? '-' : '+') . $this->h, $format); $format = str_replace('%R%i', ($this->invert ? '-' : '+') . $this->i, $format); $format = str_replace('%R%s', ($this->invert ? '-' : '+') . $this->s, $format); $format = str_replace('%y', $this->y, $format); $format = str_replace('%m', $this->m, $format); $format = str_replace('%d', $this->d, $format); $format = str_replace('%h', $this->h, $format); $format = str_replace('%i', $this->i, $format); $format = str_replace('%s', $this->s, $format); return $format; } } function date_diff2(DateTime $date1, DateTime $date2) { $diff = new DateInterval1(); if($date1 > $date2) { $tmp = $date1; $date1 = $date2; $date2 = $tmp; $diff->invert = 1; } else { $diff->invert = 0; } $diff->y = ((int) $date2->format('Y')) - ((int) $date1->format('Y')); $diff->m = ((int) $date2->format('n')) - ((int) $date1->format('n')); if($diff->m < 0) { $diff->y -= 1; $diff->m = $diff->m + 12; } $diff->d = ((int) $date2->format('j')) - ((int) $date1->format('j')); if($diff->d < 0) { $diff->m -= 1; $diff->d = $diff->d + ((int) $date1->format('t')); } $diff->h = ((int) $date2->format('G')) - ((int) $date1->format('G')); if($diff->h < 0) { $diff->d -= 1; $diff->h = $diff->h + 24; } $diff->i = ((int) $date2->format('i')) - ((int) $date1->format('i')); if($diff->i < 0) { $diff->h -= 1; $diff->i = $diff->i + 60; } $diff->s = ((int) $date2->format('s')) - ((int) $date1->format('s')); if($diff->s < 0) { $diff->i -= 1; $diff->s = $diff->s + 60; } $start_ts = $date1->format('U'); $end_ts = $date2->format('U'); $days = $end_ts - $start_ts; $diff->days = round($days / 86400); if (($diff->h > 0 || $diff->i > 0 || $diff->s > 0)) $diff->days += ((bool) $diff->invert) ? 1 : -1; return $diff; } function formatHour($hours, $minutes) { // format info if ($minutes < 0) { // minutes < 0 // sub hours $hours -= floor(-$minutes / 60) + 1; // make minutes to objective $minutes += (floor(-$minutes / 60) + 1) * 60; } else { // minute > 0 // add hours $hours += floor($minutes / 60); // make minutes to < 60 $minutes -= floor($minutes / 60) * 60; } // make sure minutes patter in mm if ($minutes < 10) { $minutes = "0" . $minutes; } // return pattern hours:minutes return $hours . ':' . $minutes; } } // array(['2014-03-17 16:07:52', '2014-03-17 17:43:09'], '1:35'), $start_time = "2014-03-17 16:07:52"; $end_time = "2014-03-17 17:43:09"; $start_time = new DateTime($start_time); $end_time = new DateTime($end_time); echo '<br />'; $interval = date_diff2($start_time, $end_time); list($days, $hours, $minutes) = explode(':', $interval->format('%d:%h:%i')); $hours += ($days * 24); print_r(formatHour($hours, $minutes)); echo '<br />';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/rbCrH
function name:  (null)
number of ops:  49
compiled vars:  !0 = $start_time, !1 = $end_time, !2 = $interval, !3 = $days, !4 = $hours, !5 = $minutes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'date_diff2'
          2        DO_ICALL                                         $6      
          3        BOOL_NOT                                         ~7      $6
          4      > JMPZ                                                     ~7, ->8
    7     5    >   DECLARE_CLASS                                            'dateinterval1'
   42     6        DECLARE_FUNCTION                                         'date_diff2'
   95     7        DECLARE_FUNCTION                                         'formathour'
  121     8    >   ASSIGN                                                   !0, '2014-03-17+16%3A07%3A52'
  122     9        ASSIGN                                                   !1, '2014-03-17+17%3A43%3A09'
  123    10        NEW                                              $10     'DateTime'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !0, $10
  124    14        NEW                                              $13     'DateTime'
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !1, $13
  126    18        ECHO                                                     '%3Cbr+%2F%3E'
  127    19        INIT_FCALL_BY_NAME                                       'date_diff2'
         20        SEND_VAR_EX                                              !0
         21        SEND_VAR_EX                                              !1
         22        DO_FCALL                                      0  $16     
         23        ASSIGN                                                   !2, $16
  128    24        INIT_FCALL                                               'explode'
         25        SEND_VAL                                                 '%3A'
         26        INIT_METHOD_CALL                                         !2, 'format'
         27        SEND_VAL_EX                                              '%25d%3A%25h%3A%25i'
         28        DO_FCALL                                      0  $18     
         29        SEND_VAR                                                 $18
         30        DO_ICALL                                         $19     
         31        FETCH_LIST_R                                     $20     $19, 0
         32        ASSIGN                                                   !3, $20
         33        FETCH_LIST_R                                     $22     $19, 1
         34        ASSIGN                                                   !4, $22
         35        FETCH_LIST_R                                     $24     $19, 2
         36        ASSIGN                                                   !5, $24
         37        FREE                                                     $19
  129    38        MUL                                              ~26     !3, 24
         39        ASSIGN_OP                                     1          !4, ~26
  131    40        INIT_FCALL                                               'print_r'
         41        INIT_FCALL_BY_NAME                                       'formatHour'
         42        SEND_VAR_EX                                              !4
         43        SEND_VAR_EX                                              !5
         44        DO_FCALL                                      0  $28     
         45        SEND_VAR                                                 $28
         46        DO_ICALL                                                 
  132    47        ECHO                                                     '%3Cbr+%2F%3E'
         48      > RETURN                                                   1

Function %00date_diff2%2Fin%2FrbCrH%3A42%241:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 46
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 70
Branch analysis from position: 60
2 jumps found. (Code = 43) Position 1 = 84, Position 2 = 90
Branch analysis from position: 84
2 jumps found. (Code = 43) Position 1 = 104, Position 2 = 110
Branch analysis from position: 104
2 jumps found. (Code = 43) Position 1 = 124, Position 2 = 130
Branch analysis from position: 124
2 jumps found. (Code = 47) Position 1 = 149, Position 2 = 152
Branch analysis from position: 149
2 jumps found. (Code = 47) Position 1 = 153, Position 2 = 156
Branch analysis from position: 153
2 jumps found. (Code = 43) Position 1 = 157, Position 2 = 165
Branch analysis from position: 157
2 jumps found. (Code = 43) Position 1 = 160, Position 2 = 162
Branch analysis from position: 160
1 jumps found. (Code = 42) Position 1 = 163
Branch analysis from position: 163
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 162
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 165
Branch analysis from position: 156
Branch analysis from position: 152
Branch analysis from position: 130
Branch analysis from position: 110
Branch analysis from position: 90
Branch analysis from position: 70
Branch analysis from position: 46
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 46
Branch analysis from position: 40
Branch analysis from position: 46
filename:       /in/rbCrH
function name:  date_diff2
number of ops:  167
compiled vars:  !0 = $date1, !1 = $date2, !2 = $diff, !3 = $tmp, !4 = $start_ts, !5 = $end_ts, !6 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   44     2        NEW                                              $7      'DateInterval1'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $7
   46     5        IS_SMALLER                                               !1, !0
          6      > JMPZ                                                     ~10, ->13
   47     7    >   ASSIGN                                                   !3, !0
   48     8        ASSIGN                                                   !0, !1
   49     9        ASSIGN                                                   !1, !3
   50    10        ASSIGN_OBJ                                               !2, 'invert'
         11        OP_DATA                                                  1
         12      > JMP                                                      ->15
   52    13    >   ASSIGN_OBJ                                               !2, 'invert'
         14        OP_DATA                                                  0
   55    15    >   INIT_METHOD_CALL                                         !1, 'format'
         16        SEND_VAL_EX                                              'Y'
         17        DO_FCALL                                      0  $17     
         18        CAST                                          4  ~18     $17
         19        INIT_METHOD_CALL                                         !0, 'format'
         20        SEND_VAL_EX                                              'Y'
         21        DO_FCALL                                      0  $19     
         22        CAST                                          4  ~20     $19
         23        SUB                                              ~21     ~18, ~20
         24        ASSIGN_OBJ                                               !2, 'y'
         25        OP_DATA                                                  ~21
   56    26        INIT_METHOD_CALL                                         !1, 'format'
         27        SEND_VAL_EX                                              'n'
         28        DO_FCALL                                      0  $23     
         29        CAST                                          4  ~24     $23
         30        INIT_METHOD_CALL                                         !0, 'format'
         31        SEND_VAL_EX                                              'n'
         32        DO_FCALL                                      0  $25     
         33        CAST                                          4  ~26     $25
         34        SUB                                              ~27     ~24, ~26
         35        ASSIGN_OBJ                                               !2, 'm'
         36        OP_DATA                                                  ~27
   57    37        FETCH_OBJ_R                                      ~28     !2, 'm'
         38        IS_SMALLER                                               ~28, 0
         39      > JMPZ                                                     ~29, ->46
   58    40    >   ASSIGN_OBJ_OP                                 2          !2, 'y'
         41        OP_DATA                                                  1
   59    42        FETCH_OBJ_R                                      ~32     !2, 'm'
         43        ADD                                              ~33     ~32, 12
         44        ASSIGN_OBJ                                               !2, 'm'
         45        OP_DATA                                                  ~33
   61    46    >   INIT_METHOD_CALL                                         !1, 'format'
         47        SEND_VAL_EX                                              'j'
         48        DO_FCALL                                      0  $35     
         49        CAST                                          4  ~36     $35
         50        INIT_METHOD_CALL                                         !0, 'format'
         51        SEND_VAL_EX                                              'j'
         52        DO_FCALL                                      0  $37     
         53        CAST                                          4  ~38     $37
         54        SUB                                              ~39     ~36, ~38
         55        ASSIGN_OBJ                                               !2, 'd'
         56        OP_DATA                                                  ~39
   62    57        FETCH_OBJ_R                                      ~40     !2, 'd'
         58        IS_SMALLER                                               ~40, 0
         59      > JMPZ                                                     ~41, ->70
   63    60    >   ASSIGN_OBJ_OP                                 2          !2, 'm'
         61        OP_DATA                                                  1
   64    62        FETCH_OBJ_R                                      ~44     !2, 'd'
         63        INIT_METHOD_CALL                                         !0, 'format'
         64        SEND_VAL_EX                                              't'
         65        DO_FCALL                                      0  $45     
         66        CAST                                          4  ~46     $45
         67        ADD                                              ~47     ~44, ~46
         68        ASSIGN_OBJ                                               !2, 'd'
         69        OP_DATA                                                  ~47
   66    70    >   INIT_METHOD_CALL                                         !1, 'format'
         71        SEND_VAL_EX                                              'G'
         72        DO_FCALL                                      0  $49     
         73        CAST                                          4  ~50     $49
         74        INIT_METHOD_CALL                                         !0, 'format'
         75        SEND_VAL_EX                                              'G'
         76        DO_FCALL                                      0  $51     
         77        CAST                                          4  ~52     $51
         78        SUB                                              ~53     ~50, ~52
         79        ASSIGN_OBJ                                               !2, 'h'
         80        OP_DATA                                                  ~53
   67    81        FETCH_OBJ_R                                      ~54     !2, 'h'
         82        IS_SMALLER                                               ~54, 0
         83      > JMPZ                                                     ~55, ->90
   68    84    >   ASSIGN_OBJ_OP                                 2          !2, 'd'
         85        OP_DATA                                                  1
   69    86        FETCH_OBJ_R                                      ~58     !2, 'h'
         87        ADD                                              ~59     ~58, 24
         88        ASSIGN_OBJ                                               !2, 'h'
         89        OP_DATA                                                  ~59
   71    90    >   INIT_METHOD_CALL                                         !1, 'format'
         91        SEND_VAL_EX                                              'i'
         92        DO_FCALL                                      0  $61     
         93        CAST                                          4  ~62     $61
         94        INIT_METHOD_CALL                                         !0, 'format'
         95        SEND_VAL_EX                                              'i'
         96        DO_FCALL                                      0  $63     
         97        CAST                                          4  ~64     $63
         98        SUB                                              ~65     ~62, ~64
         99        ASSIGN_OBJ                                               !2, 'i'
        100        OP_DATA                                                  ~65
   72   101        FETCH_OBJ_R                                      ~66     !2, 'i'
        102        IS_SMALLER                                               ~66, 0
        103      > JMPZ                                                     ~67, ->110
   73   104    >   ASSIGN_OBJ_OP                                 2          !2, 'h'
        105        OP_DATA                                                  1
   74   106        FETCH_OBJ_R                                      ~70     !2, 'i'
        107        ADD                                              ~71     ~70, 60
        108        ASSIGN_OBJ                                               !2, 'i'
        109        OP_DATA                                                  ~71
   76   110    >   INIT_METHOD_CALL                                         !1, 'format'
        111        SEND_VAL_EX                                              's'
        112        DO_FCALL                                      0  $73     
        113        CAST                                          4  ~74     $73
        114        INIT_METHOD_CALL                                         !0, 'format'
        115        SEND_VAL_EX                                              's'
        116        DO_FCALL                                      0  $75     
        117        CAST                                          4  ~76     $75
        118        SUB                                              ~77     ~74, ~76
        119        ASSIGN_OBJ                                               !2, 's'
        120        OP_DATA                                                  ~77
   77   121        FETCH_OBJ_R                                      ~78     !2, 's'
        122        IS_SMALLER                                               ~78, 0
        123      > JMPZ                                                     ~79, ->130
   78   124    >   ASSIGN_OBJ_OP                                 2          !2, 'i'
        125        OP_DATA                                                  1
   79   126        FETCH_OBJ_R                                      ~82     !2, 's'
        127        ADD                                              ~83     ~82, 60
        128        ASSIGN_OBJ                                               !2, 's'
        129        OP_DATA                                                  ~83
   82   130    >   INIT_METHOD_CALL                                         !0, 'format'
        131        SEND_VAL_EX                                              'U'
        132        DO_FCALL                                      0  $84     
        133        ASSIGN                                                   !4, $84
   83   134        INIT_METHOD_CALL                                         !1, 'format'
        135        SEND_VAL_EX                                              'U'
        136        DO_FCALL                                      0  $86     
        137        ASSIGN                                                   !5, $86
   84   138        SUB                                              ~88     !5, !4
        139        ASSIGN                                                   !6, ~88
   85   140        INIT_FCALL                                               'round'
        141        DIV                                              ~91     !6, 86400
        142        SEND_VAL                                                 ~91
        143        DO_ICALL                                         $92     
        144        ASSIGN_OBJ                                               !2, 'days'
        145        OP_DATA                                                  $92
   87   146        FETCH_OBJ_R                                      ~93     !2, 'h'
        147        IS_SMALLER                                       ~94     0, ~93
        148      > JMPNZ_EX                                         ~94     ~94, ->152
        149    >   FETCH_OBJ_R                                      ~95     !2, 'i'
        150        IS_SMALLER                                       ~96     0, ~95
        151        BOOL                                             ~94     ~96
        152    > > JMPNZ_EX                                         ~94     ~94, ->156
        153    >   FETCH_OBJ_R                                      ~97     !2, 's'
        154        IS_SMALLER                                       ~98     0, ~97
        155        BOOL                                             ~94     ~98
        156    > > JMPZ                                                     ~94, ->165
   88   157    >   FETCH_OBJ_R                                      ~100    !2, 'invert'
        158        BOOL                                             ~101    ~100
        159      > JMPZ                                                     ~101, ->162
   89   160    >   QM_ASSIGN                                        ~102    1
        161      > JMP                                                      ->163
   90   162    >   QM_ASSIGN                                        ~102    -1
   88   163    >   ASSIGN_OBJ_OP                                 1          !2, 'days'
   90   164        OP_DATA                                                  ~102
   92   165    > > RETURN                                                   !2
   94   166*     > RETURN                                                   null

End of function %00date_diff2%2Fin%2FrbCrH%3A42%241

Function %00formathour%2Fin%2FrbCrH%3A95%242:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 20
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 35
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 35
Branch analysis from position: 33
Branch analysis from position: 35
filename:       /in/rbCrH
function name:  formatHour
number of ops:  39
compiled vars:  !0 = $hours, !1 = $minutes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   95     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   97     2        IS_SMALLER                                               !1, 0
          3      > JMPZ                                                     ~2, ->20
  100     4    >   INIT_FCALL                                               'floor'
          5        MUL                                              ~3      !1, -1
          6        DIV                                              ~4      ~3, 60
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                         $5      
          9        ADD                                              ~6      $5, 1
         10        ASSIGN_OP                                     2          !0, ~6
  102    11        INIT_FCALL                                               'floor'
         12        MUL                                              ~8      !1, -1
         13        DIV                                              ~9      ~8, 60
         14        SEND_VAL                                                 ~9
         15        DO_ICALL                                         $10     
         16        ADD                                              ~11     $10, 1
         17        MUL                                              ~12     ~11, 60
         18        ASSIGN_OP                                     1          !1, ~12
         19      > JMP                                                      ->31
  106    20    >   INIT_FCALL                                               'floor'
         21        DIV                                              ~14     !1, 60
         22        SEND_VAL                                                 ~14
         23        DO_ICALL                                         $15     
         24        ASSIGN_OP                                     1          !0, $15
  108    25        INIT_FCALL                                               'floor'
         26        DIV                                              ~17     !1, 60
         27        SEND_VAL                                                 ~17
         28        DO_ICALL                                         $18     
         29        MUL                                              ~19     $18, 60
         30        ASSIGN_OP                                     2          !1, ~19
  112    31    >   IS_SMALLER                                               !1, 10
         32      > JMPZ                                                     ~21, ->35
  113    33    >   CONCAT                                           ~22     '0', !1
         34        ASSIGN                                                   !1, ~22
  116    35    >   CONCAT                                           ~24     !0, '%3A'
         36        CONCAT                                           ~25     ~24, !1
         37      > RETURN                                                   ~25
  117    38*     > RETURN                                                   null

End of function %00formathour%2Fin%2FrbCrH%3A95%242

Class DateInterval1:
Function format:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 46
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 59
Branch analysis from position: 57
1 jumps found. (Code = 42) Position 1 = 60
Branch analysis from position: 60
2 jumps found. (Code = 43) Position 1 = 70, Position 2 = 72
Branch analysis from position: 70
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 72
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 59
2 jumps found. (Code = 43) Position 1 = 70, Position 2 = 72
Branch analysis from position: 70
Branch analysis from position: 72
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 59
Branch analysis from position: 57
Branch analysis from position: 59
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 46
Branch analysis from position: 44
Branch analysis from position: 46
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
Branch analysis from position: 33
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
Branch analysis from position: 20
filename:       /in/rbCrH
function name:  format
number of ops:  123
compiled vars:  !0 = $format
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '%25R%25y'
   19     3        FETCH_OBJ_R                                      ~1      'invert'
          4      > JMPZ                                                     ~1, ->7
          5    >   QM_ASSIGN                                        ~2      '-'
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~2      '%2B'
          8    >   FETCH_OBJ_R                                      ~3      'y'
          9        CONCAT                                           ~4      ~2, ~3
         10        SEND_VAL                                                 ~4
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $5      
   18    13        ASSIGN                                                   !0, $5
   20    14        INIT_FCALL                                               'str_replace'
         15        SEND_VAL                                                 '%25R%25m'
   21    16        FETCH_OBJ_R                                      ~7      'invert'
         17      > JMPZ                                                     ~7, ->20
         18    >   QM_ASSIGN                                        ~8      '-'
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~8      '%2B'
         21    >   FETCH_OBJ_R                                      ~9      'm'
         22        CONCAT                                           ~10     ~8, ~9
         23        SEND_VAL                                                 ~10
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $11     
   20    26        ASSIGN                                                   !0, $11
   22    27        INIT_FCALL                                               'str_replace'
         28        SEND_VAL                                                 '%25R%25d'
   23    29        FETCH_OBJ_R                                      ~13     'invert'
         30      > JMPZ                                                     ~13, ->33
         31    >   QM_ASSIGN                                        ~14     '-'
         32      > JMP                                                      ->34
         33    >   QM_ASSIGN                                        ~14     '%2B'
         34    >   FETCH_OBJ_R                                      ~15     'd'
         35        CONCAT                                           ~16     ~14, ~15
         36        SEND_VAL                                                 ~16
         37        SEND_VAR                                                 !0
         38        DO_ICALL                                         $17     
   22    39        ASSIGN                                                   !0, $17
   24    40        INIT_FCALL                                               'str_replace'
         41        SEND_VAL                                                 '%25R%25h'
   25    42        FETCH_OBJ_R                                      ~19     'invert'
         43      > JMPZ                                                     ~19, ->46
         44    >   QM_ASSIGN                                        ~20     '-'
         45      > JMP                                                      ->47
         46    >   QM_ASSIGN                                        ~20     '%2B'
         47    >   FETCH_OBJ_R                                      ~21     'h'
         48        CONCAT                                           ~22     ~20, ~21
         49        SEND_VAL                                                 ~22
         50        SEND_VAR                                                 !0
         51        DO_ICALL                                         $23     
   24    52        ASSIGN                                                   !0, $23
   26    53        INIT_FCALL                                               'str_replace'
         54        SEND_VAL                                                 '%25R%25i'
   27    55        FETCH_OBJ_R                                      ~25     'invert'
         56      > JMPZ                                                     ~25, ->59
         57    >   QM_ASSIGN                                        ~26     '-'
         58      > JMP                                                      ->60
         59    >   QM_ASSIGN                                        ~26     '%2B'
         60    >   FETCH_OBJ_R                                      ~27     'i'
         61        CONCAT                                           ~28     ~26, ~27
         62        SEND_VAL                                                 ~28
         63        SEND_VAR                                                 !0
         64        DO_ICALL                                         $29     
   26    65        ASSIGN                                                   !0, $29
   28    66        INIT_FCALL                                               'str_replace'
         67        SEND_VAL                                                 '%25R%25s'
   29    68        FETCH_OBJ_R                                      ~31     

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.24 ms | 1420 KiB | 25 Q