3v4l.org

run code in 300+ PHP versions simultaneously
<?php $wdUses = array(); $ssUses = array(); $monthArray = array(); $subTime = date('Y-m-d', strtotime('-1 years')); $currentTime = date('Y-m-d'); echo $subTime; $wdLog = AuditLog::findAllInDateRangeWithProductIdsAndActionId(date('y-m-d h', $subTime) ,$currentTime, 1, 1); $ssLog = AuditLog::findAllInDateRangeWithProductIdsAndActionId(date('y-m-d h', $subTime) ,$currentTime, 3, 1); for($i = 0; $i < 12; $i++) { $startTime = date('Y-m-d', strtotime('-$i months')); $endTime = date('Y-m-d', strtotime('-($i +1) months')); foreach ($wdLog as $log) { if( $log->getDateTime() >= $subtime && $log->getDateTime() < $endTime ) { ++$wdUses[$i]; } } foreach ($ssLog as $log) { if( $log->getDateTime() >= $subtime && $log->getDateTime() < $endTime ) { ++$ssUses[$i]; } } $monthArray[$i] = $startTime(); } $wdUses = json_encode($wdUses); $ssUses = json_encode($ssUses); $monthArray = json_encode($monthArray); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 91
Branch analysis from position: 91
2 jumps found. (Code = 44) Position 1 = 93, Position 2 = 40
Branch analysis from position: 93
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
2 jumps found. (Code = 77) Position 1 = 57, Position 2 = 70
Branch analysis from position: 57
2 jumps found. (Code = 78) Position 1 = 58, Position 2 = 70
Branch analysis from position: 58
2 jumps found. (Code = 46) Position 1 = 62, Position 2 = 66
Branch analysis from position: 62
2 jumps found. (Code = 43) Position 1 = 67, Position 2 = 69
Branch analysis from position: 67
1 jumps found. (Code = 42) Position 1 = 57
Branch analysis from position: 57
Branch analysis from position: 69
Branch analysis from position: 66
Branch analysis from position: 70
2 jumps found. (Code = 77) Position 1 = 72, Position 2 = 85
Branch analysis from position: 72
2 jumps found. (Code = 78) Position 1 = 73, Position 2 = 85
Branch analysis from position: 73
2 jumps found. (Code = 46) Position 1 = 77, Position 2 = 81
Branch analysis from position: 77
2 jumps found. (Code = 43) Position 1 = 82, Position 2 = 84
Branch analysis from position: 82
1 jumps found. (Code = 42) Position 1 = 72
Branch analysis from position: 72
Branch analysis from position: 84
Branch analysis from position: 81
Branch analysis from position: 85
2 jumps found. (Code = 44) Position 1 = 93, Position 2 = 40
Branch analysis from position: 93
Branch analysis from position: 40
Branch analysis from position: 85
Branch analysis from position: 70
filename:       /in/4nnUV
function name:  (null)
number of ops:  106
compiled vars:  !0 = $wdUses, !1 = $ssUses, !2 = $monthArray, !3 = $subTime, !4 = $currentTime, !5 = $wdLog, !6 = $ssLog, !7 = $i, !8 = $startTime, !9 = $endTime, !10 = $log, !11 = $subtime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, <array>
    5     3        INIT_FCALL                                               'date'
          4        SEND_VAL                                                 'Y-m-d'
          5        INIT_FCALL                                               'strtotime'
          6        SEND_VAL                                                 '-1+years'
          7        DO_ICALL                                         $15     
          8        SEND_VAR                                                 $15
          9        DO_ICALL                                         $16     
         10        ASSIGN                                                   !3, $16
    6    11        INIT_FCALL                                               'date'
         12        SEND_VAL                                                 'Y-m-d'
         13        DO_ICALL                                         $18     
         14        ASSIGN                                                   !4, $18
   10    15        ECHO                                                     !3
   12    16        INIT_STATIC_METHOD_CALL                                  'AuditLog', 'findAllInDateRangeWithProductIdsAndActionId'
         17        INIT_FCALL                                               'date'
         18        SEND_VAL                                                 'y-m-d+h'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                         $20     
         21        SEND_VAR_NO_REF_EX                                       $20
         22        SEND_VAR_EX                                              !4
         23        SEND_VAL_EX                                              1
         24        SEND_VAL_EX                                              1
         25        DO_FCALL                                      0  $21     
         26        ASSIGN                                                   !5, $21
   13    27        INIT_STATIC_METHOD_CALL                                  'AuditLog', 'findAllInDateRangeWithProductIdsAndActionId'
         28        INIT_FCALL                                               'date'
         29        SEND_VAL                                                 'y-m-d+h'
         30        SEND_VAR                                                 !3
         31        DO_ICALL                                         $23     
         32        SEND_VAR_NO_REF_EX                                       $23
         33        SEND_VAR_EX                                              !4
         34        SEND_VAL_EX                                              3
         35        SEND_VAL_EX                                              1
         36        DO_FCALL                                      0  $24     
         37        ASSIGN                                                   !6, $24
   16    38        ASSIGN                                                   !7, 0
         39      > JMP                                                      ->91
   18    40    >   INIT_FCALL                                               'date'
         41        SEND_VAL                                                 'Y-m-d'
         42        INIT_FCALL                                               'strtotime'
         43        SEND_VAL                                                 '-%24i+months'
         44        DO_ICALL                                         $27     
         45        SEND_VAR                                                 $27
         46        DO_ICALL                                         $28     
         47        ASSIGN                                                   !8, $28
   19    48        INIT_FCALL                                               'date'
         49        SEND_VAL                                                 'Y-m-d'
         50        INIT_FCALL                                               'strtotime'
         51        SEND_VAL                                                 '-%28%24i+%2B1%29+months'
         52        DO_ICALL                                         $30     
         53        SEND_VAR                                                 $30
         54        DO_ICALL                                         $31     
         55        ASSIGN                                                   !9, $31
   20    56      > FE_RESET_R                                       $33     !5, ->70
         57    > > FE_FETCH_R                                               $33, !10, ->70
   22    58    >   INIT_METHOD_CALL                                         !10, 'getDateTime'
         59        DO_FCALL                                      0  $34     
         60        IS_SMALLER_OR_EQUAL                              ~35     !11, $34
         61      > JMPZ_EX                                          ~35     ~35, ->66
         62    >   INIT_METHOD_CALL                                         !10, 'getDateTime'
         63        DO_FCALL                                      0  $36     
         64        IS_SMALLER                                       ~37     $36, !9
         65        BOOL                                             ~35     ~37
         66    > > JMPZ                                                     ~35, ->69
   24    67    >   FETCH_DIM_RW                                     $38     !0, !7
         68        PRE_INC                                                  $38
   20    69    > > JMP                                                      ->57
         70    >   FE_FREE                                                  $33
   28    71      > FE_RESET_R                                       $40     !6, ->85
         72    > > FE_FETCH_R                                               $40, !10, ->85
   30    73    >   INIT_METHOD_CALL                                         !10, 'getDateTime'
         74        DO_FCALL                                      0  $41     
         75        IS_SMALLER_OR_EQUAL                              ~42     !11, $41
         76      > JMPZ_EX                                          ~42     ~42, ->81
         77    >   INIT_METHOD_CALL                                         !10, 'getDateTime'
         78        DO_FCALL                                      0  $43     
         79        IS_SMALLER                                       ~44     $43, !9
         80        BOOL                                             ~42     ~44
         81    > > JMPZ                                                     ~42, ->84
   32    82    >   FETCH_DIM_RW                                     $45     !1, !7
         83        PRE_INC                                                  $45
   28    84    > > JMP                                                      ->72
         85    >   FE_FREE                                                  $40
   35    86        INIT_DYNAMIC_CALL                                        !8
         87        DO_FCALL                                      0  $48     
         88        ASSIGN_DIM                                               !2, !7
         89        OP_DATA                                                  $48
   16    90        PRE_INC                                                  !7
         91    >   IS_SMALLER                                               !7, 12
         92      > JMPNZ                                                    ~50, ->40
   37    93    >   INIT_FCALL                                               'json_encode'
         94        SEND_VAR                                                 !0
         95        DO_ICALL                                         $51     
         96        ASSIGN                                                   !0, $51
   38    97        INIT_FCALL                                               'json_encode'
         98        SEND_VAR                                                 !1
         99        DO_ICALL                                         $53     
        100        ASSIGN                                                   !1, $53
   39   101        INIT_FCALL                                               'json_encode'
        102        SEND_VAR                                                 !2
        103        DO_ICALL                                         $55     
        104        ASSIGN                                                   !2, $55
   41   105      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.37 ms | 1404 KiB | 19 Q