3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); $array[0] = 'Los%20Angeles,%20CA,%20United%20States%20(LAX-Los%20Angeles%20Intl.)'; $array[1] = "Miami,%20FL,%20United%20States%20(MIA-Miami%20Intl.)"; $array[2] = "Nassau,%20Bahamas%20(NAS-Nassau%20Intl.)"; $array[3] = "Honolulu,%20HI,%20United%20States%20(HNL-Honolulu%20Intl.)"; $array[4] = "Mexico%20City,%20Distrito%20Federal,%20Mexico%20(MEX-Mexico%20City%20Intl.)"; $array[5] = "George%20Town,%20Cayman%20Islands%20(GCM-Owen%20Roberts%20Intl.)"; if ( $_SESSION['pack'] == "FL PACKAGE - 3DAY" ) { $dest = $array[1]; $exp = explode('- ', $_SESSION['pack']); $pack_days = str_replace('DAY', '', $exp); } //JAN - 1 //FEB - 2 //MAR - 3 //APR - 4 //MAY - 5 //JUN - 6 //JUL - 7 //AUG - 8 //SEP - 9 //OCT - 10 //NOV - 11 //DEC - 12 $explode = explode('/', $_POST['date_dep']); $day = $explode[1] + $pack_days; $month = $explode[0]; $year = $explode[2]; if ( ($explode[0] == 1 OR $explode[0] == 3 OR $explode[0] == 5 OR $explode[0] == 7 OR $explode[0] == 8 OR $explode[0] == 10 OR $explode[0] == 12) && $day > 31 ) { $day -= 31; $month += 1; } if ( ($explode[0] == 4 OR $explode[0] == 6 OR $explode[0] == 9 OR $explode[0] == 11) && $day > 30 ) { $day -= 30; $month += 1; } if ( $explode[0] == 2 && $day > 28 ) { $day -= 28; $month += 1; } if ( $month == 13 ) { $month -= 12; $year += 1; } $date = $month.'/'.$day.'/'.$year; $from = "from:FLL"; //leg1 $from2 = ",to:".$dest; //leg1.2 $datefrom = ",departure:".$_POST['date_dep']."TANYT"; //leg1.3 $to = "from:".$dest; //leg2 $to2 = ",to:FLL"; //leg2.1 $dateto = ",departure:".$date."TANYT"; //leg 2.3 $children_ages = array(); $num = $_POST['children']; if ( $num == 0 ) { $children_imp = null; } else { for ($i = 0; $i <= $num - 2; $i++) { $children_ages[] = '15;'; } $children_ages[$i] = '15'; $children_imp = '['.implode($children_ages).']'; } $children = "children:".$_POST['children'].$children_imp; $adults = ",adults:".$_POST['adults']; $seniors = ",seniors:0"; $infant_in = ",infantinlap:Y"; $url_formatted = "http://www.travelocity.com/Flights-Search?trip=roundtrip&leg1=".$from.$from2.$datefrom."&leg2=".$to.$to2.$dateto."&passengers=".$children.$adults.$seniors.$infant_in."&mode=search"; header('Location: '.$url_formatted);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 33
Branch analysis from position: 18
2 jumps found. (Code = 47) Position 1 = 50, Position 2 = 53
Branch analysis from position: 50
2 jumps found. (Code = 47) Position 1 = 54, Position 2 = 57
Branch analysis from position: 54
2 jumps found. (Code = 47) Position 1 = 58, Position 2 = 61
Branch analysis from position: 58
2 jumps found. (Code = 47) Position 1 = 62, Position 2 = 65
Branch analysis from position: 62
2 jumps found. (Code = 47) Position 1 = 66, Position 2 = 69
Branch analysis from position: 66
2 jumps found. (Code = 47) Position 1 = 70, Position 2 = 73
Branch analysis from position: 70
2 jumps found. (Code = 46) Position 1 = 74, Position 2 = 76
Branch analysis from position: 74
2 jumps found. (Code = 43) Position 1 = 77, Position 2 = 79
Branch analysis from position: 77
2 jumps found. (Code = 47) Position 1 = 82, Position 2 = 85
Branch analysis from position: 82
2 jumps found. (Code = 47) Position 1 = 86, Position 2 = 89
Branch analysis from position: 86
2 jumps found. (Code = 47) Position 1 = 90, Position 2 = 93
Branch analysis from position: 90
2 jumps found. (Code = 46) Position 1 = 94, Position 2 = 96
Branch analysis from position: 94
2 jumps found. (Code = 43) Position 1 = 97, Position 2 = 99
Branch analysis from position: 97
2 jumps found. (Code = 46) Position 1 = 102, Position 2 = 104
Branch analysis from position: 102
2 jumps found. (Code = 43) Position 1 = 105, Position 2 = 107
Branch analysis from position: 105
2 jumps found. (Code = 43) Position 1 = 109, Position 2 = 111
Branch analysis from position: 109
2 jumps found. (Code = 43) Position 1 = 136, Position 2 = 138
Branch analysis from position: 136
1 jumps found. (Code = 42) Position 1 = 154
Branch analysis from position: 154
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 138
1 jumps found. (Code = 42) Position 1 = 143
Branch analysis from position: 143
2 jumps found. (Code = 44) Position 1 = 146, Position 2 = 140
Branch analysis from position: 146
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 140
2 jumps found. (Code = 44) Position 1 = 146, Position 2 = 140
Branch analysis from position: 146
Branch analysis from position: 140
Branch analysis from position: 111
Branch analysis from position: 107
Branch analysis from position: 104
Branch analysis from position: 99
Branch analysis from position: 96
Branch analysis from position: 93
Branch analysis from position: 89
Branch analysis from position: 85
Branch analysis from position: 79
Branch analysis from position: 76
Branch analysis from position: 73
Branch analysis from position: 69
Branch analysis from position: 65
Branch analysis from position: 61
Branch analysis from position: 57
Branch analysis from position: 53
Branch analysis from position: 33
filename:       /in/85Ftc
function name:  (null)
number of ops:  184
compiled vars:  !0 = $array, !1 = $dest, !2 = $exp, !3 = $pack_days, !4 = $explode, !5 = $day, !6 = $month, !7 = $year, !8 = $date, !9 = $from, !10 = $from2, !11 = $datefrom, !12 = $to, !13 = $to2, !14 = $dateto, !15 = $children_ages, !16 = $num, !17 = $children_imp, !18 = $i, !19 = $children, !20 = $adults, !21 = $seniors, !22 = $infant_in, !23 = $url_formatted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                                 
    5     2        ASSIGN_DIM                                               !0, 0
          3        OP_DATA                                                  'Los%2520Angeles%2C%2520CA%2C%2520United%2520States%2520%28LAX-Los%2520Angeles%2520Intl.%29'
    6     4        ASSIGN_DIM                                               !0, 1
          5        OP_DATA                                                  'Miami%2C%2520FL%2C%2520United%2520States%2520%28MIA-Miami%2520Intl.%29'
    7     6        ASSIGN_DIM                                               !0, 2
          7        OP_DATA                                                  'Nassau%2C%2520Bahamas%2520%28NAS-Nassau%2520Intl.%29'
    8     8        ASSIGN_DIM                                               !0, 3
          9        OP_DATA                                                  'Honolulu%2C%2520HI%2C%2520United%2520States%2520%28HNL-Honolulu%2520Intl.%29'
    9    10        ASSIGN_DIM                                               !0, 4
         11        OP_DATA                                                  'Mexico%2520City%2C%2520Distrito%2520Federal%2C%2520Mexico%2520%28MEX-Mexico%2520City%2520Intl.%29'
   10    12        ASSIGN_DIM                                               !0, 5
         13        OP_DATA                                                  'George%2520Town%2C%2520Cayman%2520Islands%2520%28GCM-Owen%2520Roberts%2520Intl.%29'
   13    14        FETCH_R                      global              ~31     '_SESSION'
         15        FETCH_DIM_R                                      ~32     ~31, 'pack'
         16        IS_EQUAL                                                 ~32, 'FL+PACKAGE+-+3DAY'
         17      > JMPZ                                                     ~33, ->33
   15    18    >   FETCH_DIM_R                                      ~34     !0, 1
         19        ASSIGN                                                   !1, ~34
   16    20        INIT_FCALL                                               'explode'
         21        SEND_VAL                                                 '-+'
         22        FETCH_R                      global              ~36     '_SESSION'
         23        FETCH_DIM_R                                      ~37     ~36, 'pack'
         24        SEND_VAL                                                 ~37
         25        DO_ICALL                                         $38     
         26        ASSIGN                                                   !2, $38
   17    27        INIT_FCALL                                               'str_replace'
         28        SEND_VAL                                                 'DAY'
         29        SEND_VAL                                                 ''
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                         $40     
         32        ASSIGN                                                   !3, $40
   33    33    >   INIT_FCALL                                               'explode'
         34        SEND_VAL                                                 '%2F'
         35        FETCH_R                      global              ~42     '_POST'
         36        FETCH_DIM_R                                      ~43     ~42, 'date_dep'
         37        SEND_VAL                                                 ~43
         38        DO_ICALL                                         $44     
         39        ASSIGN                                                   !4, $44
   34    40        FETCH_DIM_R                                      ~46     !4, 1
         41        ADD                                              ~47     ~46, !3
         42        ASSIGN                                                   !5, ~47
   35    43        FETCH_DIM_R                                      ~49     !4, 0
         44        ASSIGN                                                   !6, ~49
   36    45        FETCH_DIM_R                                      ~51     !4, 2
         46        ASSIGN                                                   !7, ~51
   38    47        FETCH_DIM_R                                      ~53     !4, 0
         48        IS_EQUAL                                         ~54     ~53, 1
         49      > JMPNZ_EX                                         ~54     ~54, ->53
         50    >   FETCH_DIM_R                                      ~55     !4, 0
         51        IS_EQUAL                                         ~56     ~55, 3
         52        BOOL                                             ~54     ~56
         53    > > JMPNZ_EX                                         ~54     ~54, ->57
         54    >   FETCH_DIM_R                                      ~57     !4, 0
         55        IS_EQUAL                                         ~58     ~57, 5
         56        BOOL                                             ~54     ~58
         57    > > JMPNZ_EX                                         ~54     ~54, ->61
         58    >   FETCH_DIM_R                                      ~59     !4, 0
         59        IS_EQUAL                                         ~60     ~59, 7
         60        BOOL                                             ~54     ~60
         61    > > JMPNZ_EX                                         ~54     ~54, ->65
         62    >   FETCH_DIM_R                                      ~61     !4, 0
         63        IS_EQUAL                                         ~62     ~61, 8
         64        BOOL                                             ~54     ~62
         65    > > JMPNZ_EX                                         ~54     ~54, ->69
         66    >   FETCH_DIM_R                                      ~63     !4, 0
         67        IS_EQUAL                                         ~64     ~63, 10
         68        BOOL                                             ~54     ~64
         69    > > JMPNZ_EX                                         ~54     ~54, ->73
         70    >   FETCH_DIM_R                                      ~65     !4, 0
         71        IS_EQUAL                                         ~66     ~65, 12
         72        BOOL                                             ~54     ~66
         73    > > JMPZ_EX                                          ~54     ~54, ->76
         74    >   IS_SMALLER                                       ~67     31, !5
         75        BOOL                                             ~54     ~67
         76    > > JMPZ                                                     ~54, ->79
   40    77    >   ASSIGN_OP                                     2          !5, 31
   41    78        ASSIGN_OP                                     1          !6, 1
   44    79    >   FETCH_DIM_R                                      ~70     !4, 0
         80        IS_EQUAL                                         ~71     ~70, 4
         81      > JMPNZ_EX                                         ~71     ~71, ->85
         82    >   FETCH_DIM_R                                      ~72     !4, 0
         83        IS_EQUAL                                         ~73     ~72, 6
         84        BOOL                                             ~71     ~73
         85    > > JMPNZ_EX                                         ~71     ~71, ->89
         86    >   FETCH_DIM_R                                      ~74     !4, 0
         87        IS_EQUAL                                         ~75     ~74, 9
         88        BOOL                                             ~71     ~75
         89    > > JMPNZ_EX                                         ~71     ~71, ->93
         90    >   FETCH_DIM_R                                      ~76     !4, 0
         91        IS_EQUAL                                         ~77     ~76, 11
         92        BOOL                                             ~71     ~77
         93    > > JMPZ_EX                                          ~71     ~71, ->96
         94    >   IS_SMALLER                                       ~78     30, !5
         95        BOOL                                             ~71     ~78
         96    > > JMPZ                                                     ~71, ->99
   46    97    >   ASSIGN_OP                                     2          !5, 30
   47    98        ASSIGN_OP                                     1          !6, 1
   50    99    >   FETCH_DIM_R                                      ~81     !4, 0
        100        IS_EQUAL                                         ~82     ~81, 2
        101      > JMPZ_EX                                          ~82     ~82, ->104
        102    >   IS_SMALLER                                       ~83     28, !5
        103        BOOL                                             ~82     ~83
        104    > > JMPZ                                                     ~82, ->107
   52   105    >   ASSIGN_OP                                     2          !5, 28
   53   106        ASSIGN_OP                                     1          !6, 1
   56   107    >   IS_EQUAL                                                 !6, 13
        108      > JMPZ                                                     ~86, ->111
   58   109    >   ASSIGN_OP                                     2          !6, 12
   59   110        ASSIGN_OP                                     1          !7, 1
   62   111    >   CONCAT                                           ~89     !6, '%2F'
        112        CONCAT                                           ~90     ~89, !5
        113        CONCAT                                           ~91     ~90, '%2F'
        114        CONCAT                                           ~92     ~91, !7
        115        ASSIGN                                                   !8, ~92
   64   116        ASSIGN                                                   !9, 'from%3AFLL'
   65   117        CONCAT                                           ~95     '%2Cto%3A', !1
        118        ASSIGN                                                   !10, ~95
   66   119        FETCH_R                      global              ~97     '_POST'
        120        FETCH_DIM_R                                      ~98     ~97, 'date_dep'
        121        CONCAT                                           ~99     '%2Cdeparture%3A', ~98
        122        CONCAT                                           ~100    ~99, 'TANYT'
        123        ASSIGN                                                   !11, ~100
   68   124        CONCAT                                           ~102    'from%3A', !1
        125        ASSIGN                                                   !12, ~102
   69   126        ASSIGN                                                   !13, '%2Cto%3AFLL'
   70   127        CONCAT                                           ~105    '%2Cdeparture%3A', !8
        128        CONCAT                                           ~106    ~105, 'TANYT'
        129        ASSIGN                                                   !14, ~106
   72   130        ASSIGN                                                   !15, <array>
   73   131        FETCH_R                      global              ~109    '_POST'
        132        FETCH_DIM_R                                      ~110    ~109, 'children'
        133        ASSIGN                                                   !16, ~110
   75   134        IS_EQUAL                                                 !16, 0
        135      > JMPZ                                                     ~112, ->138
   77   136    >   ASSIGN                                                   !17, null
        137      > JMP                                                      ->154
   81   138    >   ASSIGN                                                   !18, 0
        139      > JMP                                                      ->143
   83   140    >   ASSIGN_DIM                                               !15
        141        OP_DATA                                                  '15%3B'
   81   142        PRE_INC                                                  !18
        143    >   SUB                                              ~117    !16, 2
        144        IS_SMALLER_OR_EQUAL                                      !18, ~117
        145      > JMPNZ                                                    ~118, ->140
   86   146    >   ASSIGN_DIM                                               !15, !18
        147        OP_DATA                                                  '15'
   87   148        INIT_FCALL                                               'implode'
        149        SEND_VAR                                                 !15
        150        DO_ICALL                                         $120    
        151        CONCAT                                           ~121    '%5B', $120
        152        CONCAT                                           ~122    ~121, '%5D'
        153        ASSIGN                                                   !17, ~122
   90   154    >   FETCH_R                      global              ~124    '_POST'
        155        FETCH_DIM_R                                      ~125    ~124, 'children'
        156        CONCAT                                           ~126    'children%3A', ~125
        157        CONCAT                                           ~127    ~126, !17
        158        ASSIGN                                                   !19, ~127
   91   159        FETCH_R                      global              ~129    '_POST'
        160        FETCH_DIM_R                                      ~130    ~129, 'adults'
        161        CONCAT                                           ~131    '%2Cadults%3A', ~130
        162        ASSIGN                                                   !20, ~131
   92   163        ASSIGN                                                   !21, '%2Cseniors%3A0'
   93   164        ASSIGN                                                   !22, '%2Cinfantinlap%3AY'
   95   165        CONCAT                                           ~135    'http%3A%2F%2Fwww.travelocity.com%2FFlights-Search%3Ftrip%3Droundtrip%26leg1%3D', !9
        166        CONCAT                                           ~136    ~135, !10
        167        CONCAT                                           ~137    ~136, !11
        168        CONCAT                                           ~138    ~137, '%26leg2%3D'
        169        CONCAT                                           ~139    ~138, !12
        170        CONCAT                                           ~140    ~139, !13
        171        CONCAT                                           ~141    ~140, !14
        172        CONCAT                                           ~142    ~141, '%26passengers%3D'
        173        CONCAT                                           ~143    ~142, !19
        174        CONCAT                                           ~144    ~143, !20
        175        CONCAT                                           ~145    ~144, !21
        176        CONCAT                                           ~146    ~145, !22
        177        CONCAT                                           ~147    ~146, '%26mode%3Dsearch'
        178        ASSIGN                                                   !23, ~147
   97   179        INIT_FCALL                                               'header'
        180        CONCAT                                           ~149    'Location%3A+', !23
        181        SEND_VAL                                                 ~149
        182        DO_ICALL                                                 
        183      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.97 ms | 1412 KiB | 23 Q