3v4l.org

run code in 300+ PHP versions simultaneously
<?php define("STATE_ID", "3"); define("DATA_CACHE_TIMEOUT", "9999"); /** * Class to import data from SECC into SRDB * *@author Rochak Chauhan */ class ImportController { public function actionBuffer() { header( 'Content-type: text/html; charset=utf-8' ); echo 'Begin ...<br />'; for( $i = 0 ; $i < 10 ; $i++ ) { echo $i . '<br />'; flush(); ob_flush(); sleep(1); } echo 'End ...<br />'; } public function actionIndex() { $t1 = date("r"); $ts1 = microtime(true); $tot = 0; header( 'Content-type: text/html; charset=utf-8' ); echo "\r\n<p> ******** Started at $t1 ******** </p>\r\n"; $connection = Yii::app() -> db; $command = $connection -> createCommand('SELECT * FROM seccsirsa LIMIT 0,10'); $rows = $command -> queryAll(); //executes the SQL statement and returns the first row of the //$res = array(); foreach ($rows as $row) { extract($row); echo " ****************************************************** "; echo "\r\n<hr /><p>Full Name: $Name_en ($Name_h) </p>\r\n"; $SRDB_District_ID = $this -> getDistrictId($District); echo "\r\n<p>District: $District ($SRDB_District_ID) </p>\r\n"; $SRDB_City_ID = $this -> getCityId($Village,$District); echo "\r\n<p>City: $Village ($SRDB_City_ID) </p>\r\n"; flush(); ob_flush(); } $t2 = date("r"); $ts2 = microtime(true); $diff = ($ts2 - $ts1); echo "\r\n<p> ******** Stopped at $t2 ******** </p>\r\n"; echo "\r\n<p> ******** Total Execution Time: $diff microseconds ******** </p>\r\n"; echo "\r\n<p> ******** Total Records Imported: $tot ******** </p>\r\n"; } /** *Function to get District ID from District Name * *@param string $District *@param int */ private function getDistrictId($District) { //Select if record exists $District = trim(strtolower($District)); $connection = Yii::app() -> db; $connection -> active = true; $command = $connection -> createCommand("SELECT LR_ID FROM tblLandRegion WHERE lower(LR_Name) = '$District' AND LR_Type='District' "); $row = $command -> queryRow(); //If no record found if ($row === false) { //Insert record in DB (Master Table) $command = $connection -> createCommand("INSERT INTO tblLandRegion (LR_Name,LR_Type) VALUES('$District', 'District') "); $rowCount = $command -> execute(); if ($rowCount == 0) { die("\r\n<hr />FATAL ERROR 0x01: Failed to insert $District in Master table :: " . __FILE__ . " at line nunber " . __LINE__); } else { //Cache and Return the PK/ID of the new inserted record. $row = Yii::app() -> cache -> get('cache_' . $District . "_" . STATE_ID); if (($row === false) || row($res)) { $District = trim(strtolower($District)); $connection = Yii::app() -> db; $command = $connection -> createCommand("SELECT LR_ID FROM tblLandRegion WHERE lower(LR_Name) = '$District' AND LR_Type='District' ORDER BY LR_ID DESC"); $row = $command -> queryRow(); Yii::app() -> cache -> set('cache_' . $District . "_" . STATE_ID, $row, DATA_CACHE_TIMEOUT); } $District_ID = $row['LR_ID']; //Insert record in DB (Reference Table) $command = $connection -> createCommand("INSERT INTO tblDistrict (District_ID, State_ID) VALUES('$District_ID', '" . STATE_ID . "') "); $rowCount = $command -> execute(); if ($rowCount == 0) { die("\r\n<hr />FATAL ERROR 0x02: Failed to insert $District in Reference table :: " . __FILE__ . " at line nunber " . __LINE__); } return $District_ID; } } else { //Return the PK/ID of the record. return $row['LR_ID']; } } /** *Function to get City ID from City Name * *@param string $City *@param int */ private function getCityId($City, $District) { //Check record in Cache $row = Yii::app() -> cache -> get('cache_' . $City . "_" . $District); if (($row === false) || row($res)) { //Select if record exists $City = trim(strtolower($City)); $connection = Yii::app() -> db; $connection -> active = true; $command = $connection -> createCommand("SELECT LR_ID FROM tblLandRegion WHERE lower(LR_Name) = '$City' AND LR_Type='City' "); $row = $command -> queryRow(); } //If no record found if ($row === false) { //Insert record in DB (Master Table) $command = $connection -> createCommand("INSERT INTO tblLandRegion (LR_Name,LR_Type) VALUES('$City', 'City') "); $rowCount = $command -> execute(); if ($rowCount == 0) { die("\r\n<hr />FATAL ERROR 0x01: Failed to insert $City in Master table :: " . __FILE__ . " at line nunber " . __LINE__); } else { //Cache and Return the PK/ID of the new inserted record. $row = Yii::app() -> cache -> get('cache_' . $City . "_" . $District); if (($row === false) || row($res)) { $District = trim(strtolower($District)); $connection = Yii::app() -> db; $command = $connection -> createCommand("SELECT LR_ID FROM tblLandRegion WHERE lower(LR_Name) = '$City' AND LR_Type='City' ORDER BY LR_ID DESC"); $row = $command -> queryRow(); Yii::app() -> cache -> set('cache_' . $City . "_" . $District, $row, DATA_CACHE_TIMEOUT); } $City_ID = $row['LR_ID']; //Insert record in DB (Reference Table) $command = $connection -> createCommand("INSERT INTO tblCity (District_ID, City_ID) VALUES('$District_ID', '$City_ID') "); $rowCount = $command -> execute(); if ($rowCount == 0) { die("\r\n<hr />FATAL ERROR 0x02: Failed to insert $District in Reference table :: " . __FILE__ . " at line nunber " . __LINE__); } return $City_ID; } } else { //Cache and Return the PK/ID of the record. Yii::app() -> cache -> set('cache_' . $City . "_" . $District, $row, DATA_CACHE_TIMEOUT); return $row['LR_ID']; } } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OpAIb
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'STATE_ID'
          2        SEND_VAL                                                 '3'
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'DATA_CACHE_TIMEOUT'
          6        SEND_VAL                                                 '9999'
          7        DO_ICALL                                                 
  155     8      > RETURN                                                   1

Class ImportController:
Function actionbuffer:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 6
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 6
Branch analysis from position: 18
Branch analysis from position: 6
filename:       /in/OpAIb
function name:  actionBuffer
number of ops:  20
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-type%3A+text%2Fhtml%3B+charset%3Dutf-8'
          2        DO_ICALL                                                 
   14     3        ECHO                                                     'Begin+...%3Cbr+%2F%3E'
   15     4        ASSIGN                                                   !0, 0
          5      > JMP                                                      ->16
   17     6    >   CONCAT                                           ~3      !0, '%3Cbr+%2F%3E'
          7        ECHO                                                     ~3
   18     8        INIT_FCALL                                               'flush'
          9        DO_ICALL                                                 
   19    10        INIT_FCALL                                               'ob_flush'
         11        DO_ICALL                                                 
   20    12        INIT_FCALL                                               'sleep'
         13        SEND_VAL                                                 1
         14        DO_ICALL                                                 
   15    15        PRE_INC                                                  !0
         16    >   IS_SMALLER                                               !0, 10
         17      > JMPNZ                                                    ~8, ->6
   22    18    >   ECHO                                                     'End+...%3Cbr+%2F%3E'
   23    19      > RETURN                                                   null

End of function actionbuffer

Function actionindex:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 28, Position 2 = 65
Branch analysis from position: 28
2 jumps found. (Code = 78) Position 1 = 29, Position 2 = 65
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 65
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 65
filename:       /in/OpAIb
function name:  actionIndex
number of ops:  89
compiled vars:  !0 = $t1, !1 = $ts1, !2 = $tot, !3 = $connection, !4 = $command, !5 = $rows, !6 = $row, !7 = $Name_en, !8 = $Name_h, !9 = $SRDB_District_ID, !10 = $District, !11 = $SRDB_City_ID, !12 = $Village, !13 = $t2, !14 = $ts2, !15 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'r'
          2        DO_ICALL                                         $16     
          3        ASSIGN                                                   !0, $16
   27     4        INIT_FCALL                                               'microtime'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $18     
          7        ASSIGN                                                   !1, $18
   28     8        ASSIGN                                                   !2, 0
   30     9        INIT_FCALL                                               'header'
         10        SEND_VAL                                                 'Content-type%3A+text%2Fhtml%3B+charset%3Dutf-8'
         11        DO_ICALL                                                 
   31    12        ROPE_INIT                                     3  ~23     '%0D%0A%3Cp%3E+%2A%2A%2A%2A%2A%2A%2A%2A+Started+at++'
         13        ROPE_ADD                                      1  ~23     ~23, !0
         14        ROPE_END                                      2  ~22     ~23, '+%2A%2A%2A%2A%2A%2A%2A%2A+%3C%2Fp%3E%0D%0A'
         15        ECHO                                                     ~22
   33    16        INIT_STATIC_METHOD_CALL                                  'Yii', 'app'
         17        DO_FCALL                                      0  $25     
         18        FETCH_OBJ_R                                      ~26     $25, 'db'
         19        ASSIGN                                                   !3, ~26
   34    20        INIT_METHOD_CALL                                         !3, 'createCommand'
         21        SEND_VAL_EX                                              'SELECT+%2A+FROM+seccsirsa+LIMIT+0%2C10'
         22        DO_FCALL                                      0  $28     
         23        ASSIGN                                                   !4, $28
   35    24        INIT_METHOD_CALL                                         !4, 'queryAll'
         25        DO_FCALL                                      0  $30     
         26        ASSIGN                                                   !5, $30
   38    27      > FE_RESET_R                                       $32     !5, ->65
         28    > > FE_FETCH_R                                               $32, !6, ->65
   39    29    >   INIT_FCALL                                               'extract'
         30        SEND_REF                                                 !6
         31        DO_ICALL                                                 
   40    32        ECHO                                                     '+%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A+'
   41    33        ROPE_INIT                                     5  ~35     '%0D%0A%3Chr+%2F%3E%3Cp%3EFull+Name%3A+'
         34        ROPE_ADD                                      1  ~35     ~35, !7
         35        ROPE_ADD                                      2  ~35     ~35, '+%28'
         36        ROPE_ADD                                      3  ~35     ~35, !8
         37        ROPE_END                                      4  ~34     ~35, '%29+%3C%2Fp%3E%0D%0A'
         38        ECHO                                                     ~34
   42    39        INIT_METHOD_CALL                                         'getDistrictId'
         40        SEND_VAR_EX                                              !10
         41        DO_FCALL                                      0  $38     
         42        ASSIGN                                                   !9, $38
   43    43        ROPE_INIT                                     5  ~41     '%0D%0A%3Cp%3EDistrict%3A+'
         44        ROPE_ADD                                      1  ~41     ~41, !10
         45        ROPE_ADD                                      2  ~41     ~41, '+%28'
         46        ROPE_ADD                                      3  ~41     ~41, !9
         47        ROPE_END                                      4  ~40     ~41, '%29+%3C%2Fp%3E%0D%0A'
         48        ECHO                                                     ~40
   44    49        INIT_METHOD_CALL                                         'getCityId'
         50        SEND_VAR_EX                                              !12
         51        SEND_VAR_EX                                              !10
         52        DO_FCALL                                      0  $44     
         53        ASSIGN                                                   !11, $44
   45    54        ROPE_INIT                                     5  ~47     '%0D%0A%3Cp%3ECity%3A+'
         55        ROPE_ADD                                      1  ~47     ~47, !12
         56        ROPE_ADD                                      2  ~47     ~47, '+%28'
         57        ROPE_ADD                                      3  ~47     ~47, !11
         58        ROPE_END                                      4  ~46     ~47, '%29+%3C%2Fp%3E%0D%0A'
         59        ECHO                                                     ~46
   47    60        INIT_FCALL                                               'flush'
         61        DO_ICALL                                                 
         62        INIT_FCALL                                               'ob_flush'
         63        DO_ICALL                                                 
   38    64      > JMP                                                      ->28
         65    >   FE_FREE                                                  $32
   50    66        INIT_FCALL                                               'date'
         67        SEND_VAL                                                 'r'
         68        DO_ICALL                                         $52     
         69        ASSIGN                                                   !13, $52
   51    70        INIT_FCALL                                               'microtime'
         71        SEND_VAL                                                 <true>
         72        DO_ICALL                                         $54     
         73        ASSIGN                                                   !14, $54
   52    74        SUB                                              ~56     !14, !1
         75        ASSIGN                                                   !15, ~56
   53    76        ROPE_INIT                                     3  ~59     '%0D%0A%3Cp%3E+%2A%2A%2A%2A%2A%2A%2A%2A+Stopped+at++'
         77        ROPE_ADD                                      1  ~59     ~59, !13
         78        ROPE_END                                      2  ~58     ~59, '+%2A%2A%2A%2A%2A%2A%2A%2A+%3C%2Fp%3E%0D%0A'
         79        ECHO                                                     ~58
   54    80        ROPE_INIT                                     3  ~62     '%0D%0A%3Cp%3E+%2A%2A%2A%2A%2A%2A%2A%2A+Total+Execution+Time%3A+'
         81        ROPE_ADD                                      1  ~62     ~62, !15
         82        ROPE_END                                      2  ~61     ~62, '+microseconds+%2A%2A%2A%2A%2A%2A%2A%2A+%3C%2Fp%3E%0D%0A'
         83        ECHO                                                     ~61
   55    84        ROPE_INIT                                     3  ~65     '%0D%0A%3Cp%3E+%2A%2A%2A%2A%2A%2A%2A%2A+Total+Records+Imported%3A+'
         85        ROPE_ADD                                      1  ~65     ~65, !2
         86        ROPE_END                                      2  ~64     ~65, '++%2A%2A%2A%2A%2A%2A%2A%2A+%3C%2Fp%3E%0D%0A'
         87        ECHO                                                     ~64
   56    88      > RETURN                                                   null

End of function actionindex

Function getdistrictid:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 124
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 46
Branch analysis from position: 38
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 46
2 jumps found. (Code = 47) Position 1 = 59, Position 2 = 63
Branch analysis from position: 59
2 jumps found. (Code = 43) Position 1 = 64, Position 2 = 98
Branch analysis from position: 64
2 jumps found. (Code = 43) Position 1 = 115, Position 2 = 122
Branch analysis from position: 115
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 122
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 98
Branch analysis from position: 63
Branch analysis from position: 124
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OpAIb
function name:  getDistrictId
number of ops:  127
compiled vars:  !0 = $District, !1 = $connection, !2 = $command, !3 = $row, !4 = $rowCount, !5 = $res, !6 = $District_ID
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   64     0  E >   RECV                                             !0      
   66     1        INIT_FCALL                                               'trim'
          2        INIT_FCALL                                               'strtolower'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5        SEND_VAR                                                 $7
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !0, $8
   67     8        INIT_STATIC_METHOD_CALL                                  'Yii', 'app'
          9        DO_FCALL                                      0  $10     
         10        FETCH_OBJ_R                                      ~11     $10, 'db'
         11        ASSIGN                                                   !1, ~11
   68    12        ASSIGN_OBJ                                               !1, 'active'
         13        OP_DATA                                                  <true>
   69    14        INIT_METHOD_CALL                                         !1, 'createCommand'
         15        ROPE_INIT                                     3  ~15     'SELECT+LR_ID+FROM+tblLandRegion+WHERE+lower%28LR_Name%29+%3D+%27'
         16        ROPE_ADD                                      1  ~15     ~15, !0
         17        ROPE_END                                      2  ~14     ~15, '%27+AND+LR_Type%3D%27District%27+'
         18        SEND_VAL_EX                                              ~14
         19        DO_FCALL                                      0  $17     
         20        ASSIGN                                                   !2, $17
   70    21        INIT_METHOD_CALL                                         !2, 'queryRow'
         22        DO_FCALL                                      0  $19     
         23        ASSIGN                                                   !3, $19
   72    24        TYPE_CHECK                                    4          !3
         25      > JMPZ                                                     ~21, ->124
   74    26    >   INIT_METHOD_CALL                                         !1, 'createCommand'
         27        ROPE_INIT                                     3  ~23     'INSERT+INTO+tblLandRegion+%28LR_Name%2CLR_Type%29+VALUES%28%27'
         28        ROPE_ADD                                      1  ~23     ~23, !0
         29        ROPE_END                                      2  ~22     ~23, '%27%2C+%27District%27%29+'
         30        SEND_VAL_EX                                              ~22
         31        DO_FCALL                                      0  $25     
         32        ASSIGN                                                   !2, $25
   75    33        INIT_METHOD_CALL                                         !2, 'execute'
         34        DO_FCALL                                      0  $27     
         35        ASSIGN                                                   !4, $27
   76    36        IS_EQUAL                                                 !4, 0
         37      > JMPZ                                                     ~29, ->46
   77    38    >   ROPE_INIT                                     3  ~31     '%0D%0A%3Chr+%2F%3EFATAL+ERROR+0x01%3A+Failed+to+insert+'
         39        ROPE_ADD                                      1  ~31     ~31, !0
         40        ROPE_END                                      2  ~30     ~31, '+in+Master+table+%3A%3A+'
         41        CONCAT                                           ~33     ~30, '%2Fin%2FOpAIb'
         42        CONCAT                                           ~34     ~33, '+at+line+nunber+'
         43        CONCAT                                           ~35     ~34, '77'
         44      > EXIT                                                     ~35
         45*       JMP                                                      ->123
   80    46    >   INIT_STATIC_METHOD_CALL                                  'Yii', 'app'
         47        DO_FCALL                                      0  $36     
         48        FETCH_OBJ_R                                      ~37     $36, 'cache'
         49        INIT_METHOD_CALL                                         ~37, 'get'
         50        CONCAT                                           ~38     'cache_', !0
         51        CONCAT                                           ~39     ~38, '_'
         52        FETCH_CONSTANT                                   ~40     'STATE_ID'
         53        CONCAT                                           ~41     ~39, ~40
         54        SEND_VAL_EX                                              ~41
         55        DO_FCALL                                      0  $42     
         56        ASSIGN                                                   !3, $42
   81    57        TYPE_CHECK                                    4  ~44     !3
         58      > JMPNZ_EX                                         ~44     ~44, ->63
         59    >   INIT_FCALL_BY_NAME                                       'row'
         60        SEND_VAR_EX                                              !5
         61        DO_FCALL                                      0  $45     
         62        BOOL                                             ~44     $45
         63    > > JMPZ                                                     ~44, ->98
   82    64    >   INIT_FCALL                                               'trim'
         65        INIT_FCALL                                               'strtolower'
         66        SEND_VAR                                                 !0
         67        DO_ICALL                                         $46     
         68        SEND_VAR                                                 $46
         69        DO_ICALL                                         $47     
         70        ASSIGN                                                   !0, $47
   83    71        INIT_STATIC_METHOD_CALL                                  'Yii', 'app'
         72        DO_FCALL                                      0  $49     
         73        FETCH_OBJ_R                                      ~50     $49, 'db'
         74        ASSIGN                                                   !1, ~50
   84    75        INIT_METHOD_CALL                                         !1, 'createCommand'
         76        ROPE_INIT                                     3  ~53     'SELECT+LR_ID+FROM+tblLandRegion+WHERE+lower%28LR_Name%29+%3D+%27'
         77        ROPE_ADD                                      1  ~53     ~53, !0
         78        ROPE_END                                      2  ~52     ~53, '%27+AND+LR_Type%3D%27District%27+ORDER+BY+LR_ID+DESC'
         79        SEND_VAL_EX                                              ~52
         80        DO_FCALL                                      0  $55     
         81        ASSIGN                                                   !2, $55
   85    82        INIT_METHOD_CALL                                         !2, 'queryRow'
         83        DO_FCALL                                      0  $57     
         84        ASSIGN                                                   !3, $57
   86    85        INIT_STATIC_METHOD_CALL                                  'Yii', 'app'
         86        DO_FCALL                                      0  $59     
         87        FETCH_OBJ_R                                      ~60     $59, 'cache'
         88        INIT_METHOD_CALL                                         ~60, 'set'
         89        CONCAT                                           ~61     'cache_', !0
         90        CONCAT                                           ~62     ~61, '_'
         91        FETCH_CONSTANT                                   ~63     'STATE_ID'
         92        CONCAT                                           ~64     ~62, ~63
         93        SEND_VAL_EX                                              ~64
         94        SEND_VAR_EX                                              !3
         95        FETCH_CONSTANT                                   ~65     'DATA_CACHE_TIMEOUT'
         96        SEND_VAL_EX                                              ~65
         97        DO_FCALL                                      0          
   88    98    >   FETCH_DIM_R                                      ~67     !3, 'LR_ID'
         99        ASSIGN                                                   !6, ~67
   90   100        INIT_METHOD_CALL                                         !1, 'createCommand'
        101        ROPE_INIT                                     3  ~70     'INSERT+INTO+tblDistrict+%28District_ID%2C+State_ID%29+VALUES%28%27'
        102        ROPE_ADD                                      1  ~70     ~70, !6
        103        ROPE_END                                      2  ~69     ~70, '%27%2C+%27'
        104        FETCH_CONSTANT                                   ~72     'STATE_ID'
        105        CONCAT                                           ~73     ~69, ~72
        106        CONCAT                                           ~74     ~73, '%27%29+'
        107        SEND_VAL_EX                                              ~74
        108        DO_FCALL                                      0  $75     
        109        ASSIGN                                                   !2, $75
   91   110        INIT_METHOD_CALL                                         !2, 'execute'
        111        DO_FCALL                                      0  $77     
        112        ASSIGN                                                   !4, $77
   92   113        IS_EQUAL                                                 !4, 0
        114      > JMPZ                                                     ~79, ->122
   93   115    >   ROPE_INIT                                     3  ~81     '%0D%0A%3Chr+%2F%3EFATAL+ERROR+0x02%3A+Failed+to+insert+'
        116        ROPE_ADD                                      1  ~81     ~81, !0
        117        ROPE_END                                      2  ~80     ~81, '+in+Reference+table+%3A%3A+'
        118        CONCAT                                           ~83     ~80, '%2Fin%2FOpAIb'
        119        CONCAT                                           ~84     ~83, '+at+line+nunber+'
        120        CONCAT                                           ~85     ~84, '93'
        121      > EXIT                                                     ~85
   95   122    > > RETURN                                                   !6
        123*       JMP                                                      ->126
   99   124    >   FETCH_DIM_R                                      ~86     !3, 'LR_ID'
        125      > RETURN                                                   ~86
  101   126*     > RETURN                                                   null

End of function getdistrictid

Function getcityid:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 42
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 139
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 64
Branch analysis from position: 56
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 64
2 jumps found. (Code = 47) Position 1 = 76, Position 2 = 80
Branch analysis from position: 76
2 jumps found. (Code = 43) Position 1 = 81, Position 2 = 114
Branch analysis from position: 81
2 jumps found. (Code = 43) Position 1 = 130, Position 2 = 137
Branch analysis from position: 130
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 137
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 114
Branch analysis from position: 80
Branch analysis from position: 139
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
Branch analysis from position: 18
filename:       /in/OpAIb
function name:  getCityId
number of ops:  154
compiled vars:  !0 = $City, !1 = $District, !2 = $row, !3 = $res, !4 = $connection, !5 = $command, !6 = $rowCount, !7 = $City_ID, !8 = $District_ID
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  109     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  111     2        INIT_STATIC_METHOD_CALL                                  'Yii', 'app'
          3        DO_FCALL                                      0  $9      
          4        FETCH_OBJ_R                                      ~10     $9, 'cache'
          5        INIT_METHOD_CALL                                         ~10, 'get'
          6        CONCAT                                           ~11     'cache_', !0
          7        CONCAT                                           ~12     ~11, '_'
          8        CONCAT                                           ~13     ~12, !1
          9        SEND_VAL_EX                                              ~13
         10        DO_FCALL                                      0  $14     
         11        ASSIGN                                                   !2, $14
  112    12        TYPE_CHECK                                    4  ~16     !2
         13      > JMPNZ_EX                                         ~16     ~16, ->18
         14    >   INIT_FCALL_BY_NAME                                       'row'
         15        SEND_VAR_EX                                              !3
         16        DO_FCALL                                      0  $17     
         17        BOOL                                             ~16     $17
         18    > > JMPZ                                                     ~16, ->42
  114    19    >   INIT_FCALL                                               'trim'
         20        INIT_FCALL                                               'strtolower'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $18     
         23        SEND_VAR                                                 $18
         24        DO_ICALL                                         $19     
         25        ASSIGN                                                   !0, $19
  115    26        INIT_STATIC_METHOD_CALL                                  'Yii', 'app'
         27        DO_FCALL                                      0  $21     
         28        FETCH_OBJ_R                                      ~22     $21, 'db'
         29        ASSIGN                                                   !4, ~22
  116    30        ASSIGN_OBJ                                               !4, 'active'
         31        OP_DATA                                                  <true>
  117    32        INIT_METHOD_CALL                                         !4, 'createCommand'
         33        ROPE_INIT                                     3  ~26     'SELECT+LR_ID+FROM+tblLandRegion+WHERE+lower%28LR_Name%29+%3D+%27'
         34        ROPE_ADD                                      1  ~26     ~26, !0
         35        ROPE_END                                      2  ~25     ~26, '%27+AND+LR_Type%3D%27City%27+'
         36        SEND_VAL_EX                                              ~25
         37        DO_FCALL                                      0  $28     
         38        ASSIGN                                                   !5, $28
  118    39        INIT_METHOD_CALL                                         !5, 'queryRow'
         40        DO_FCALL                                      0  $30     
         41        ASSIGN                                                   !2, $30
  121    42    >   TYPE_CHECK                                    4          !2
         43      > JMPZ                                                     ~32, ->139
  123    44    >   INIT_METHOD_CALL                                         !4, 'createCommand'
         45        ROPE_INIT                                     3  ~34     'INSERT+INTO+tblLandRegion+%28LR_Name%2CLR_Type%29+VALUES%28%27'
         46        ROPE_ADD                                      1  ~34     ~34, !0
         47        ROPE_END                                      2  ~33     ~34, '%27%2C+%27City%27%29+'
         48        SEND_VAL_EX                                              ~33
         49        DO_FCALL                                      0  $36     
         50        ASSIGN                                                   !5, $36
  124    51        INIT_METHOD_CALL                                         !5, 'execute'
         52        DO_FCALL                                      0  $38     
         53        ASSIGN                                                   !6, $38
  125    54        IS_EQUAL                                                 !6, 0
         55      > JMPZ                                                     ~40, ->64
  126    56    >   ROPE_INIT                                     3  ~42     '%0D%0A%3Chr+%2F%3EFATAL+ERROR+0x01%3A+Failed+to+insert+'
         57        ROPE_ADD                                      1  ~42     ~42, !0
         58        ROPE_END                                      2  ~41     ~42, '+in+Master+table+%3A%3A+'
         59        CONCAT                                           ~44     ~41, '%2Fin%2FOpAIb'
         60        CONCAT                                           ~45     ~44, '+at+line+nunber+'
         61        CONCAT                                           ~46     ~45, '126'
         62      > EXIT                                                     ~46
         63*       JMP                                                      ->138
  129    64    >   INIT_STATIC_METHOD_CALL                                  'Yii', 'app'
         65        DO_FCALL                                      0  $47     
         66        FETCH_OBJ_R                                      ~48     $47, 'cache'
         67        INIT_METHOD_CALL                                         ~48, 'get'
         68        CONCAT                                           ~49     'cache_', !0
         69        CONCAT               

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.3 ms | 1432 KiB | 33 Q