3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* */ /* * ssi_update.php * * CRON Script to directly maintain SSI's DB containing list of our members and profile survey answers. * Makes use of SSI's Bulk Import API using RESTful model to perform updates. RESTful requests made using cURL connections. * Only deletions and additons are performed. Once member is created in SSI's DB, updates are not done. * * @dependencies BatchProcessLogging, SSI, SSI_db, SSI_api * Derives from cint_update.php * @author Dave Buchanan * @version 1.0 * @created 20150227 */ require_once '_variables.php'; require_once '_classes/class.MarsImportToSsi.php'; //SSI Class for API requests ini_set( 'memory_limit', '1024M' ); // initially added to try to fix Out of Memory error set_time_limit(0); $debug=1; // 0=no echo output, just batch logging, 1=batch and echo out, 2= only echo out ///Bulk is the flag needs to be passed in like --bulk $extra_options= getopt('P:L:',array('bulk','redo')); //Decide if we're doing bulk full export to csv OR api import calls $type = (isset($extra_options['bulk'])) ? 'bulk' : 'api'; ///Special flag to redo import run, doesn't drop/create/repopulate partner tables $redo = (isset($extra_options['redo'])) ? true : false; /* Init SSI class and start logging */ $ssi = new SSI(basename(__FILE__),$debug,$cli_options['L'], $cli_options['P'],$type); $ssi->startLog(); $ssi->logComment("Started"); if($redo) { $ssi->logComment("REDO RUN!!!!!!!!!!!!!!!!!!!!!!!!!!! NOT GOING TO DROP PREV AND RECREATE PARTNER TABLES!!"); $ssi->sendEmailAlert("REDO RUN STARTED!!!!!!!!!!!!!!!!!!!!!!!!!!! NOT GOING TO DROP PREV AND RECREATE PARTNER TABLES!!"); } $exec_results = $ssi->alreadyRunning(); if ( (int)$exec_results[0] > 1 ) { $ssi->logComment("Process already started. Existing."); $ssi->logFinish( 'Finished: ' . $batchProcessLogging->getElapsedBatchExecutionTime(true)); exit(); } /* Init SSI Database class, pass in main SSI */ $ssi_db = new SSI_db($ssi); if($redo===false) { /* Check 1: Make sure member_partner_integration table has rows */ $check1 = $ssi_db->checkMemberPartnerIntegration(); if($check1===false) exit(0); else $ssi->logComment('Completed 1st validation, member_partner_integration not empty'); /* If exists, drop ssi_member_list_prev table and recreate from ssi_member_list */ $result = $ssi_db->dropMemberListPrev(); $result = $ssi_db->createMemberListPrev(); /* Re-create ssi_member_list from member_partner_integration. */ $result = $ssi_db->populateMemberList(); $ssi->logComment('Completed table maintainence'); /* Check 2: If counts are the same then no new members were added, something is wrong */ $check2 = $ssi_db->compareMemberListCounts(); if($check2===false) exit(0); else $ssi->logComment('Completed 2nd validation, ssi_member_list and ssi_member_list_prev counts are NOT the same'); /* Remove duplicates from Sendearnings, don't allow member email to receive surveys from both sites, inboxdollars and sendearnings */ if ($ssi->getSite() == 'sendearnings') { $ssi->logComment('Deleting duplicate members for sendearings'); $ssi_db->deleteDuplicateSEMembers(); } } else { $ssi->logComment("Redo run set, reimporting the same members! Not doing any table maintainence for ssi_member_list, ssi_member_list_prev"); } /* Get FEATURES matched in survey_partner_xref */ $result = $ssi_db->getQuestionFromSurveyPartnerXref(); ///Default 4 labels to INTEGER type question that won't exist in survey_partner_xref ///They come from survey_result_dob and member_status table $int_feature_lbls = array('postalcode','monthdob','daydob','yeardob'); $feature_lbls = array(); while( $row = mysql_fetch_assoc($result) ) { if ( !empty($row['survey_partner_question_desc']) ) array_push($feature_lbls,$row['survey_partner_question_desc']); } if($ssi->getType() == 'bulk') { $ssi->logComment("Preparing to add members to bulk csv."); $result = $ssi_db->getSurveyMembers($feature_lbls,false); ///EXPORT CSV PATH $file_name = './'.$ssi->getSite().'_export.csv'; $header = 'id,'; $header .= implode(',',$int_feature_lbls); $header .= ','.implode(',',$feature_lbls); ///Write header $z = file_put_contents($file_name,$header.PHP_EOL); } else { $ssi->logComment("Preparing to use SSI API to send members in batches"); $result = $ssi_db->getSurveyMembers($feature_lbls,true); $members = array(); $ssi_api = new SSI_api($ssi); } $total_required_features = count($feature_lbls) + count($int_feature_lbls)+1; ///Some counters to track stuff $members_skipped=0; $members_added=0; $number_of_batches=0; while( $row = mysql_fetch_assoc($result) ) { //Dont send to partner if not equal to features expected if(count($row) !== $total_required_features) { $ssi->logComment("Member ".$row['respondentid'].") doesn't have enough required features...Has ".count($row)." needs to have ".$total_required_features."."); $members_skipped++; } else { //IF bulk then append to csv, otherwise add to array and determine if ready to send a batch if($ssi->getType() == 'bulk') { $z = file_put_contents($file_name,implode(',',$row).PHP_EOL, FILE_APPEND); } else { ///Assemble json for members, member_code (respondentID) is first value while the rest should match the $feature_lbls array_push($members,array( 'respondentID'=>array_shift($row), 'values'=>array_values($row))); if(($members_added+1) % $ssi_api->getBatchCount() === 0) { $batch_result = $ssi_api->sendBatch($members,array_merge($int_feature_lbls,$feature_lbls)); ///If batch result isn't false add failed submissions to members skipped, else add current count of members $members_skipped = ($batch_result!=false) ? $members_skipped + $batch_result : $members_skipped+count($members); $number_of_batches++; ///Reset array for next batch $members = array(); } } $members_added++; } } /* END loop through members */ $ssi_db->freeResult($result); $total_sent = $members_added-$members_skipped; if($ssi->getType()!='bulk') { $ssi->logComment("Ran ".$number_of_batches." batches. Total of $members_added members to $type export. $members_skipped members skipped, total sent=$total_sent"); } else { $ssi->logComment("Added $members_added members to $type export. $members_skipped members skipped, total sent=$total_sent"); } $ssi->sendEmailFinish("Completed! $type...$members_added members added. $members_skipped members skipped, total sent=$total_sent"); $ssi->endLog("Finished $type import."); // END ASSEMBLING JSON TO SEND TO SSI // ***************************************************************************///
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 54
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 72
Branch analysis from position: 61
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 72
2 jumps found. (Code = 43) Position 1 = 78, Position 2 = 120
Branch analysis from position: 78
2 jumps found. (Code = 43) Position 1 = 83, Position 2 = 85
Branch analysis from position: 83
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 85
2 jumps found. (Code = 43) Position 1 = 105, Position 2 = 107
Branch analysis from position: 105
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 107
2 jumps found. (Code = 43) Position 1 = 114, Position 2 = 119
Branch analysis from position: 114
1 jumps found. (Code = 42) Position 1 = 123
Branch analysis from position: 123
1 jumps found. (Code = 42) Position 1 = 137
Branch analysis from position: 137
2 jumps found. (Code = 44) Position 1 = 142, Position 2 = 129
Branch analysis from position: 142
2 jumps found. (Code = 43) Position 1 = 146, Position 2 = 178
Branch analysis from position: 146
1 jumps found. (Code = 42) Position 1 = 191
Branch analysis from position: 191
1 jumps found. (Code = 42) Position 1 = 271
Branch analysis from position: 271
2 jumps found. (Code = 44) Position 1 = 276, Position 2 = 200
Branch analysis from position: 276
2 jumps found. (Code = 43) Position 1 = 285, Position 2 = 299
Branch analysis from position: 285
1 jumps found. (Code = 42) Position 1 = 310
Branch analysis from position: 310
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 299
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 200
2 jumps found. (Code = 43) Position 1 = 203, Position 2 = 216
Branch analysis from position: 203
1 jumps found. (Code = 42) Position 1 = 271
Branch analysis from position: 271
Branch analysis from position: 216
2 jumps found. (Code = 43) Position 1 = 220, Position 2 = 232
Branch analysis from position: 220
1 jumps found. (Code = 42) Position 1 = 270
Branch analysis from position: 270
2 jumps found. (Code = 44) Position 1 = 276, Position 2 = 200
Branch analysis from position: 276
Branch analysis from position: 200
Branch analysis from position: 232
2 jumps found. (Code = 43) Position 1 = 250, Position 2 = 270
Branch analysis from position: 250
2 jumps found. (Code = 43) Position 1 = 261, Position 2 = 264
Branch analysis from position: 261
1 jumps found. (Code = 42) Position 1 = 267
Branch analysis from position: 267
2 jumps found. (Code = 44) Position 1 = 276, Position 2 = 200
Branch analysis from position: 276
Branch analysis from position: 200
Branch analysis from position: 264
2 jumps found. (Code = 44) Position 1 = 276, Position 2 = 200
Branch analysis from position: 276
Branch analysis from position: 200
Branch analysis from position: 270
Branch analysis from position: 178
1 jumps found. (Code = 42) Position 1 = 271
Branch analysis from position: 271
Branch analysis from position: 129
2 jumps found. (Code = 43) Position 1 = 132, Position 2 = 137
Branch analysis from position: 132
2 jumps found. (Code = 44) Position 1 = 142, Position 2 = 129
Branch analysis from position: 142
Branch analysis from position: 129
Branch analysis from position: 137
Branch analysis from position: 119
Branch analysis from position: 120
1 jumps found. (Code = 42) Position 1 = 137
Branch analysis from position: 137
Branch analysis from position: 54
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 54
Branch analysis from position: 48
Branch analysis from position: 54
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
Branch analysis from position: 25
filename:       /in/b2W0Z
function name:  (null)
number of ops:  328
compiled vars:  !0 = $debug, !1 = $extra_options, !2 = $type, !3 = $redo, !4 = $ssi, !5 = $cli_options, !6 = $exec_results, !7 = $batchProcessLogging, !8 = $ssi_db, !9 = $check1, !10 = $result, !11 = $check2, !12 = $int_feature_lbls, !13 = $feature_lbls, !14 = $row, !15 = $file_name, !16 = $header, !17 = $z, !18 = $members, !19 = $ssi_api, !20 = $total_required_features, !21 = $members_skipped, !22 = $members_added, !23 = $number_of_batches, !24 = $batch_result, !25 = $total_sent
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INCLUDE_OR_EVAL                                          '_variables.php', REQUIRE_ONCE
   19     1        INCLUDE_OR_EVAL                                          '_classes%2Fclass.MarsImportToSsi.php', REQUIRE_ONCE
   21     2        INIT_FCALL                                               'ini_set'
          3        SEND_VAL                                                 'memory_limit'
          4        SEND_VAL                                                 '1024M'
          5        DO_ICALL                                                 
   22     6        INIT_FCALL                                               'set_time_limit'
          7        SEND_VAL                                                 0
          8        DO_ICALL                                                 
   23     9        ASSIGN                                                   !0, 1
   26    10        INIT_FCALL                                               'getopt'
         11        SEND_VAL                                                 'P%3AL%3A'
         12        SEND_VAL                                                 <array>
         13        DO_ICALL                                         $31     
         14        ASSIGN                                                   !1, $31
   28    15        ISSET_ISEMPTY_DIM_OBJ                         0          !1, 'bulk'
         16      > JMPZ                                                     ~33, ->19
         17    >   QM_ASSIGN                                        ~34     'bulk'
         18      > JMP                                                      ->20
         19    >   QM_ASSIGN                                        ~34     'api'
         20    >   ASSIGN                                                   !2, ~34
   30    21        ISSET_ISEMPTY_DIM_OBJ                         0          !1, 'redo'
         22      > JMPZ                                                     ~36, ->25
         23    >   QM_ASSIGN                                        ~37     <true>
         24      > JMP                                                      ->26
         25    >   QM_ASSIGN                                        ~37     <false>
         26    >   ASSIGN                                                   !3, ~37
   33    27        NEW                                              $39     'SSI'
         28        INIT_FCALL                                               'basename'
         29        SEND_VAL                                                 '%2Fin%2Fb2W0Z'
         30        DO_ICALL                                         $40     
         31        SEND_VAR_NO_REF_EX                                       $40
         32        SEND_VAR_EX                                              !0
         33        CHECK_FUNC_ARG                                           
         34        FETCH_DIM_FUNC_ARG                               $41     !5, 'L'
         35        SEND_FUNC_ARG                                            $41
         36        CHECK_FUNC_ARG                                           
         37        FETCH_DIM_FUNC_ARG                               $42     !5, 'P'
         38        SEND_FUNC_ARG                                            $42
         39        SEND_VAR_EX                                              !2
         40        DO_FCALL                                      0          
         41        ASSIGN                                                   !4, $39
   34    42        INIT_METHOD_CALL                                         !4, 'startLog'
         43        DO_FCALL                                      0          
   35    44        INIT_METHOD_CALL                                         !4, 'logComment'
         45        SEND_VAL_EX                                              'Started'
         46        DO_FCALL                                      0          
   36    47      > JMPZ                                                     !3, ->54
   37    48    >   INIT_METHOD_CALL                                         !4, 'logComment'
         49        SEND_VAL_EX                                              'REDO+RUN%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21+NOT+GOING+TO+DROP+PREV+AND+RECREATE+PARTNER+TABLES%21%21'
         50        DO_FCALL                                      0          
   38    51        INIT_METHOD_CALL                                         !4, 'sendEmailAlert'
         52        SEND_VAL_EX                                              'REDO+RUN+STARTED%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21+NOT+GOING+TO+DROP+PREV+AND+RECREATE+PARTNER+TABLES%21%21'
         53        DO_FCALL                                      0          
   41    54    >   INIT_METHOD_CALL                                         !4, 'alreadyRunning'
         55        DO_FCALL                                      0  $49     
         56        ASSIGN                                                   !6, $49
   43    57        FETCH_DIM_R                                      ~51     !6, 0
         58        CAST                                          4  ~52     ~51
         59        IS_SMALLER                                               1, ~52
         60      > JMPZ                                                     ~53, ->72
   45    61    >   INIT_METHOD_CALL                                         !4, 'logComment'
         62        SEND_VAL_EX                                              'Process+already+started.+Existing.'
         63        DO_FCALL                                      0          
   46    64        INIT_METHOD_CALL                                         !4, 'logFinish'
         65        INIT_METHOD_CALL                                         !7, 'getElapsedBatchExecutionTime'
         66        SEND_VAL_EX                                              <true>
         67        DO_FCALL                                      0  $55     
         68        CONCAT                                           ~56     'Finished%3A+', $55
         69        SEND_VAL_EX                                              ~56
         70        DO_FCALL                                      0          
   47    71      > EXIT                                                     
   51    72    >   NEW                                              $58     'SSI_db'
         73        SEND_VAR_EX                                              !4
         74        DO_FCALL                                      0          
         75        ASSIGN                                                   !8, $58
   53    76        TYPE_CHECK                                    4          !3
         77      > JMPZ                                                     ~61, ->120
   55    78    >   INIT_METHOD_CALL                                         !8, 'checkMemberPartnerIntegration'
         79        DO_FCALL                                      0  $62     
         80        ASSIGN                                                   !9, $62
   56    81        TYPE_CHECK                                    4          !9
         82      > JMPZ                                                     ~64, ->85
         83    > > EXIT                                                     0
         84*       JMP                                                      ->88
   57    85    >   INIT_METHOD_CALL                                         !4, 'logComment'
         86        SEND_VAL_EX                                              'Completed+1st+validation%2C+member_partner_integration+not+empty'
         87        DO_FCALL                                      0          
   60    88        INIT_METHOD_CALL                                         !8, 'dropMemberListPrev'
         89        DO_FCALL                                      0  $66     
         90        ASSIGN                                                   !10, $66
   61    91        INIT_METHOD_CALL                                         !8, 'createMemberListPrev'
         92        DO_FCALL                                      0  $68     
         93        ASSIGN                                                   !10, $68
   64    94        INIT_METHOD_CALL                                         !8, 'populateMemberList'
         95        DO_FCALL                                      0  $70     
         96        ASSIGN                                                   !10, $70
   66    97        INIT_METHOD_CALL                                         !4, 'logComment'
         98        SEND_VAL_EX                                              'Completed+table+maintainence'
         99        DO_FCALL                                      0          
   69   100        INIT_METHOD_CALL                                         !8, 'compareMemberListCounts'
        101        DO_FCALL                                      0  $73     
        102        ASSIGN                                                   !11, $73
   70   103        TYPE_CHECK                                    4          !11
        104      > JMPZ                                                     ~75, ->107
        105    > > EXIT                                                     0
        106*       JMP                                                      ->110
   71   107    >   INIT_METHOD_CALL                                         !4, 'logComment'
        108        SEND_VAL_EX                                              'Completed+2nd+validation%2C+ssi_member_list+and+ssi_member_list_prev+counts+are+NOT+the+same'
        109        DO_FCALL                                      0          
   74   110        INIT_METHOD_CALL                                         !4, 'getSite'
        111        DO_FCALL                                      0  $77     
        112        IS_EQUAL                                                 $77, 'sendearnings'
        113      > JMPZ                                                     ~78, ->119
   76   114    >   INIT_METHOD_CALL                                         !4, 'logComment'
        115        SEND_VAL_EX                                              'Deleting+duplicate+members+for+sendearings'
        116        DO_FCALL                                      0          
   77   117        INIT_METHOD_CALL                                         !8, 'deleteDuplicateSEMembers'
        118        DO_FCALL                                      0          
        119    > > JMP                                                      ->123
   81   120    >   INIT_METHOD_CALL                                         !4, 'logComment'
        121        SEND_VAL_EX                                              'Redo+run+set%2C+reimporting+the+same+members%21+Not+doing+any+table+maintainence+for+ssi_member_list%2C+ssi_member_list_prev'
        122        DO_FCALL                                      0          
   85   123    >   INIT_METHOD_CALL                                         !8, 'getQuestionFromSurveyPartnerXref'
        124        DO_FCALL                                      0  $82     
        125        ASSIGN                                                   !10, $82
   89   126        ASSIGN                                                   !12, <array>
   90   127        ASSIGN                                                   !13, <array>
   91   128      > JMP                                                      ->137
   93   129    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~86     !14, 'survey_partner_question_desc'
        130        BOOL_NOT                                         ~87     ~86
        131      > JMPZ                                                     ~87, ->137
   94   132    >   INIT_FCALL                                               'array_push'
        133        SEND_REF                                                 !13
        134        FETCH_DIM_R                                      ~88     !14, 'survey_partner_question_desc'
        135        SEND_VAL                                                 ~88
        136        DO_ICALL                                                 
   91   137    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_assoc'
        138        SEND_VAR_EX                                              !10
        139        DO_FCALL                                      0  $90     
        140        ASSIGN                                           ~91     !14, $90
        141      > JMPNZ                                                    ~91, ->129
   97   142    >   INIT_METHOD_CALL                                         !4, 'getType'
        143        DO_FCALL                                      0  $92     
        144        IS_EQUAL                                                 $92, 'bulk'
        145      > JMPZ                                                     ~93, ->178
   98   146    >   INIT_METHOD_CALL                                         !4, 'logComment'
        147        SEND_VAL_EX                                              'Preparing+to+add+members+to+bulk+csv.'
        148        DO_FCALL                                      0          
   99   149        INIT_METHOD_CALL                                         !8, 'getSurveyMembers'
        150        SEND_VAR_EX                                              !13
        151        SEND_VAL_EX                                              <false>
        152        DO_FCALL                                      0  $95     
        153        ASSIGN                                                   !10, $95
  101   154        INIT_METHOD_CALL                                         !4, 'getSite'
        155        DO_FCALL                                      0  $97     
        156        CONCAT                                           ~98     '.%2F', $97
        157        CONCAT                                           ~99     ~98, '_export.csv'
        158        ASSIGN                                                   !15, ~99
  102   159        ASSIGN                                                   !16, 'id%2C'
  103   160        INIT_FCALL                                               'implode'
        161        SEND_VAL                                                 '%2C'
        162        SEND_VAR                                                 !12
        163        DO_ICALL                                         $102    
        164        ASSIGN_OP                                     8          !16, $102
  104   165        INIT_FCALL                                               'implode'
        166        SEND_VAL                                                 '%2C'
        167        SEND_VAR                                                 !13
        168        DO_ICALL                                         $104    
        169        CONCAT                                           ~105    '%2C', $104
        170        ASSIGN_OP                                     8          !16, ~105
  106   171        INIT_FCALL                                               'file_put_contents'
        172        SEND_VAR                                                 !15
        173        CONCAT                                           ~107    !16, '%0A'
        174        SEND_VAL                                                 ~107
        175        DO_ICALL                                         $108    
        176        ASSIGN                                                   !17, $108
        177      > JMP                                                      ->191
  109   178    >   INIT_METHOD_CALL                                         !4, 'logComment'
        179        SEND_VAL_EX                                              'Preparing+to+use+SSI+API+to+send+members+in+batches'
        180        DO_FCALL                                      0          
  110   181        INIT_METHOD_CALL                                         !8, 'getSurveyMembers'
        182        SEND_VAR_EX                                              !13
        183        SEND_VAL_EX                                              <true>
        184        DO_FCALL                                      0  $111    
        185        ASSIGN                                                   !10, $111
  111   186        ASSIGN                                                   !18, <array>
  112   187        NEW                                              $114    'SSI_api'
        188        SEND_VAR_EX                                              !4
        189        DO_FCALL                                      0          
        190        ASSIGN                                                   !19, $114
  114   191    >   COUNT                                            ~117    !13
        192        COUNT                                            ~118    !12
        193        ADD                                              ~119    ~117, ~118
        194        ADD                                              ~120    ~119, 1
        195        ASSIGN                                                   !20, ~120
  117   196        ASSIGN                                                   !21, 0
  118   197        ASSIGN                                                   !22, 0
  119   198        ASSIGN                                                   !23, 0
  121   199      > JMP                                                      ->271
  124   200    >   COUNT                                            ~125    !14
        201        IS_NOT_IDENTICAL                                         !20, ~125
        202      > JMPZ                                                     ~126, ->216
  125   203    >   INIT_METHOD_CALL                                         !4, 'logComment'
        204        FETCH_DIM_R                                      ~127    !14, 'respondentid'
        205        CONCAT                                           ~128    'Member+', ~127
        206        CONCAT                                           ~129    ~128, '%29+doesn%27t+have+enough+required+features...Has+'
        207        COUNT                                            ~130    !14
        208        CONCAT                                           ~131    ~129, ~130
        209        CONCAT                                           ~132    ~131, '+needs+to+have+'
        210        CONCAT                                           ~133    ~132, !20
        211        CONCAT                                           ~134    ~133, '.'
        212        SEND_VAL_EX                                              ~134
        213        DO_FCALL                                      0          
  126   214        PRE_INC                                                  !21
        215      > JMP                                                      ->271
  130   216    >   INIT_METHOD_CALL                                         !4, 'getType'
        217        DO_FCALL                                      0  $137    
        218        IS_EQUAL                                                 $137, 'bulk'
        219      > JMPZ                                                     ~138, ->232
  131   220    >   INIT_FCALL                                               'file_put_contents'
        221        SEND_VAR                                                 !15
        222        INIT_FCALL                                               'implode'
        223        SEND_VAL                                                 '%2C'
        224        SEND_VAR                                                 !14
        225        DO_ICALL                                         $139    
        226        CONCAT                                           ~140    $139, '%0A'
        227        SEND_VAL                                                 ~140
        228        SEND_VAL                                                 8
        229        DO_ICALL                                         $141    
        230        ASSIGN                                                   !17, $141
        231      > JMP                                                      ->270
  135   232    >   INIT_FCALL                                               'array_push'
        233        SEND_REF                                                 !18
        234        INIT_FCALL                                               'array_shift'
        235        SEND_REF                                                 !14
        236        DO_ICALL                                         $143    
        237        INIT_ARRAY                                       ~144    $143, 'respondentID'
        238        INIT_FCALL                                               'array_values'
        239        SEND_VAR                                                 !14
        240        DO_ICALL                                         $145    
        241        ADD_ARRAY_ELEMENT                                ~144    $145, 'values'
        242        SEND_VAL                                                 ~144
        243        DO_ICALL                                                 
  136   244        ADD                                              ~147    !22, 1
        245        INIT_METHOD_CALL                                         !19, 'getBatchCount'
        246        DO_FCALL                                      0  $148    
        247        MOD                                              ~149    ~147, $148
        248        IS_IDENTICAL                                             ~149, 0
        249      > JMPZ                                                     ~150, ->270
  137   250    >   INIT_METHOD_CALL                                         !19, 'sendBatch'
        251        SEND_VAR_EX                                              !18
        252        INIT_FCALL                                               'array_merge'
        253        SEND_VAR                                                 !12
        254        SEND_VAR                                                 !13
        255        DO_ICALL                                         $151    
        256        SEND_VAR_NO_REF_EX                                       $151
        257        DO_FCALL                                      0  $152    
        258        ASSIGN                                                   !24, $152
  139   259        BOOL                                             ~154    !24
        260      > JMPZ                                                     ~154, ->264
        261    >   ADD                                              ~155    !21, !24
        262        QM_ASSIGN                                        ~156    ~155
        263      > JMP                                                      ->267
        264    >   COUNT                                            ~157    !18
        265        ADD                                              ~158    !21, ~157
        266        QM_ASSIGN                                        ~156    ~158
        267    >   ASSIGN                                                   !21, ~156
  140   268        PRE_INC                                                  !23
  142   269        ASSIGN                                                   !18, <array>
  145   270    >   PRE_INC                                                  !22
  121   271    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_assoc'
        272        SEND_VAR_EX                                              !10
        273        DO_FCALL                                      0  $163    
        274        ASSIGN                                           ~164    !14, $163
        275      > JMPNZ                                                    ~164, ->200
  149   276    >   INIT_METHOD_CALL                                         !8, 'freeResult'
        277        SEND_VAR_EX                                              !10
        278        DO_FCALL                                      0          
  150   279        SUB                                              ~166    !22, !21
        280        ASSIGN                                                   !25, ~166
  151   281        INIT_METHOD_CALL                                         !4, 'getType'
        282        DO_FCALL                                      0  $168    
        283        IS_NOT_EQUAL                                             $168, 'bulk'
        284      > JMPZ                                                     ~169, ->299
  152   285    >   INIT_METHOD_CALL                                         !4, 'logComment'
        286        CONCAT                                           ~170    'Ran+', !23
        287        ROPE_INIT                                     8  ~172    '+batches.+Total+of+'
        288        ROPE_ADD                                      1  ~172    ~172, !22
        289        ROPE_ADD                                      2  ~172    ~172, '+members+to+'
        290        ROPE_ADD                                      3  ~172    ~172, !2
        291        ROPE_ADD                                      4  ~172    ~172, '+export.+'
        292        ROPE_ADD                                      5  ~172    ~172, !21
        293        ROPE_ADD                                      6  ~172    ~172, '+members+skipped%2C+total+sent%3D'
        294        ROPE_END                                      7  ~171    ~172, !25
        295        CONCAT                                           ~176    ~170, ~171
        296        SEND_VAL_EX                                              ~176
        297        DO_FCALL                                      0          
        298      > JMP                                                      ->310
  155   299    >   INIT_METHOD_CALL                                         !4, 'logComment'
        300        ROPE_INIT                                     8  ~179    'Added+'
        301        ROPE_ADD                                      1  ~179    ~179, !22
        302        ROPE_ADD                                      2  ~179    ~179, '+members+to+'
        303        ROPE_ADD                                      3  ~179    ~179, !2
        304        ROPE_ADD                                      4  ~179    ~179, '+export.+'
        305        ROPE_ADD                                      5  ~179    ~179, !21
        306        ROPE_ADD                                      6  ~179    ~179, '+members+skipped%2C+total+sent%3D'
        307        ROPE_END                                      7  ~178    ~179, !25
        308        SEND_VAL_EX                                              ~178
        309        DO_FCALL                                      0          
  157   310    >   INIT_METHOD_CALL                                         !4, 'sendEmailFinish'
        311        ROPE_INIT                                     8  ~185    'Completed%21+'
        312        ROPE_ADD                                      1  ~185    ~185, !2
        313        ROPE_ADD                                      2  ~185    ~185, '...'
        314        ROPE_ADD                                      3  ~185    ~185, !22
        315        ROPE_ADD                                      4  ~185    ~185, '+members+added.+'
        316        ROPE_ADD                             

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.98 ms | 1428 KiB | 33 Q