3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* filename: amazon_search_layout.php created: 7/17/2002, © 2002 php9.com Calin Uioreanu descripton: display template for Amazon Search API */ // number of Amazon search teaser results to display if ($this->iNumResults >= AWS_NUMBER_OF_RESULTS) { return; // silent } $sProductUrl = $sBookUrl; $sProductUrl = $sProductUrl .'/'. ASSOCIATE_ID; global $arTeaser; $sTdColor = $arTeaser[(int) $this->iNumResults]; // if Amazon returned an empty Image (1x1), do not display the HTML code $arSize = getimagesize ($IMAGEURLSMALL); if ((int) $arSize[1] == 1 ) { $sImageUrl = ''; } else { $sImageUrl = '<a href="http://shop.php9.com/books.php/Mode/product/AsinSearch/'. $ASIN .'/name/'. rawurlencode($PRODUCTNAME) .'"><img src="'. $IMAGEURLSMALL .'" alt="'. $PRODUCTNAME .'" border="0" /></a>'; } $iOurPrice = (int) str_replace('$', '', $OURPRICE); $iListPrice = (int) str_replace('$', '', $LISTPRICE); if ($iOurPrice && $iListPrice) { $iDiscount = ($iListPrice - $iOurPrice) / $iListPrice; $iDiscount = (int) ($iDiscount*100); if ($iDiscount > 0) { $sDiscount = ', this means <font color="red">' . $iDiscount .'%</font> off!'; } } if ($AUTHORS) { $sAuthors = ' by ' . $AUTHORS; } $OURPRICE = '$' . number_format((float) str_replace('$', '', $OURPRICE), 2); $LISTPRICE = '$' . number_format((float) str_replace('$', '', $LISTPRICE), 2); $USEDPRICE = '$' . number_format((float) str_replace('$', '', $USEDPRICE), 2); echo '<table border="0" cellpadding="2" cellspacing="0" width="'.AWS_TABLE_WIDTH.'">', '<tr><td bgcolor="'.$sTdColor.'" width="85%">', '<a href="http://shop.php9.com/books.php/Mode/product/AsinSearch/'. $ASIN .'/name/'. rawurlencode($PRODUCTNAME) .'"><b>'. $PRODUCTNAME .'</b></a>', '<font size="-2">', $sAuthors, '<br />List Price: <b><font color="red">'. $LISTPRICE .'</font></b>', '&nbsp; &nbsp; Amazon Price: <b><font color="red">'. $OURPRICE .'</font></b>', $sDiscount, '&nbsp; &nbsp; Used Price: <b><font color="red">'. $USEDPRICE .'</font></b>', '&nbsp; &nbsp; Publisher: ', $MANUFACTURER, ' ('. $RELEASEDATE .')', '<br />Buy from <a href="'. $sProductUrl .'"><b><font color="red">Amazon.com!</font></b></a>', '&nbsp;<a href="http://shop.php9.com/books.php/Mode/product/AsinSearch/'. $ASIN .'/name/'. rawurlencode($PRODUCTNAME) .'"><b><font color="red">our Top Books shop!</font></b></a>', '&nbsp;<a href="http://shop.php9.com/books.php/Mode/product/AsinSearch/'. $ASIN .'/name/'. rawurlencode($PRODUCTNAME) .'"><b><font color="red">our Tech Books shop!</font></b></a>', '</td><td bgcolor="'.$sTdColor.'" width="15%">', $sImageUrl, '</td></tr>', '</table>' ; ?> <!-- Script generated with the Amazon PHP API from php9.com Try it here: http://www.php9.com/amazon.php //-->
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 46) Position 1 = 54, Position 2 = 55
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 67
Branch analysis from position: 56
2 jumps found. (Code = 43) Position 1 = 64, Position 2 = 67
Branch analysis from position: 64
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 70
Branch analysis from position: 68
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 70
Branch analysis from position: 67
Branch analysis from position: 67
Branch analysis from position: 55
Branch analysis from position: 27
2 jumps found. (Code = 46) Position 1 = 54, Position 2 = 55
Branch analysis from position: 54
Branch analysis from position: 55
filename:       /in/mvdXE
function name:  (null)
number of ops:  167
compiled vars:  !0 = $sProductUrl, !1 = $sBookUrl, !2 = $arTeaser, !3 = $sTdColor, !4 = $arSize, !5 = $IMAGEURLSMALL, !6 = $sImageUrl, !7 = $ASIN, !8 = $PRODUCTNAME, !9 = $iOurPrice, !10 = $OURPRICE, !11 = $iListPrice, !12 = $LISTPRICE, !13 = $iDiscount, !14 = $sDiscount, !15 = $AUTHORS, !16 = $sAuthors, !17 = $USEDPRICE, !18 = $MANUFACTURER, !19 = $RELEASEDATE
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_THIS                                       $20     
          1        FETCH_OBJ_R                                      ~21     $20, 'iNumResults'
          2        FETCH_CONSTANT                                   ~22     'AWS_NUMBER_OF_RESULTS'
          3        IS_SMALLER_OR_EQUAL                                      ~22, ~21
          4      > JMPZ                                                     ~23, ->6
   12     5    > > RETURN                                                   null
   15     6    >   ASSIGN                                                   !0, !1
   16     7        CONCAT                                           ~25     !0, '%2F'
          8        FETCH_CONSTANT                                   ~26     'ASSOCIATE_ID'
          9        CONCAT                                           ~27     ~25, ~26
         10        ASSIGN                                                   !0, ~27
   18    11        BIND_GLOBAL                                              !2, 'arTeaser'
   20    12        FETCH_THIS                                       $29     
         13        FETCH_OBJ_R                                      ~30     $29, 'iNumResults'
         14        CAST                                          4  ~31     ~30
         15        FETCH_DIM_R                                      ~32     !2, ~31
         16        ASSIGN                                                   !3, ~32
   23    17        INIT_FCALL                                               'getimagesize'
         18        SEND_VAR                                                 !5
         19        DO_ICALL                                         $34     
         20        ASSIGN                                                   !4, $34
   24    21        FETCH_DIM_R                                      ~36     !4, 1
         22        CAST                                          4  ~37     ~36
         23        IS_EQUAL                                                 ~37, 1
         24      > JMPZ                                                     ~38, ->27
   25    25    >   ASSIGN                                                   !6, ''
         26      > JMP                                                      ->39
   27    27    >   CONCAT                                           ~40     '%3Ca+href%3D%22http%3A%2F%2Fshop.php9.com%2Fbooks.php%2FMode%2Fproduct%2FAsinSearch%2F', !7
         28        CONCAT                                           ~41     ~40, '%2Fname%2F'
         29        INIT_FCALL                                               'rawurlencode'
         30        SEND_VAR                                                 !8
         31        DO_ICALL                                         $42     
         32        CONCAT                                           ~43     ~41, $42
         33        CONCAT                                           ~44     ~43, '%22%3E%3Cimg+src%3D%22'
         34        CONCAT                                           ~45     ~44, !5
         35        CONCAT                                           ~46     ~45, '%22+alt%3D%22'
         36        CONCAT                                           ~47     ~46, !8
         37        CONCAT                                           ~48     ~47, '%22+border%3D%220%22+%2F%3E%3C%2Fa%3E'
         38        ASSIGN                                                   !6, ~48
   30    39    >   INIT_FCALL                                               'str_replace'
         40        SEND_VAL                                                 '%24'
         41        SEND_VAL                                                 ''
         42        SEND_VAR                                                 !10
         43        DO_ICALL                                         $50     
         44        CAST                                          4  ~51     $50
         45        ASSIGN                                                   !9, ~51
   31    46        INIT_FCALL                                               'str_replace'
         47        SEND_VAL                                                 '%24'
         48        SEND_VAL                                                 ''
         49        SEND_VAR                                                 !12
         50        DO_ICALL                                         $53     
         51        CAST                                          4  ~54     $53
         52        ASSIGN                                                   !11, ~54
   32    53      > JMPZ_EX                                          ~56     !9, ->55
         54    >   BOOL                                             ~56     !11
         55    > > JMPZ                                                     ~56, ->67
   33    56    >   SUB                                              ~57     !11, !9
         57        DIV                                              ~58     ~57, !11
         58        ASSIGN                                                   !13, ~58
   34    59        MUL                                              ~60     !13, 100
         60        CAST                                          4  ~61     ~60
         61        ASSIGN                                                   !13, ~61
   35    62        IS_SMALLER                                               0, !13
         63      > JMPZ                                                     ~63, ->67
   36    64    >   CONCAT                                           ~64     '%2C+this+means+%3Cfont+color%3D%22red%22%3E', !13
         65        CONCAT                                           ~65     ~64, '%25%3C%2Ffont%3E+off%21'
         66        ASSIGN                                                   !14, ~65
   40    67    > > JMPZ                                                     !15, ->70
   41    68    >   CONCAT                                           ~67     '+by+', !15
         69        ASSIGN                                                   !16, ~67
   44    70    >   INIT_FCALL                                               'number_format'
         71        INIT_FCALL                                               'str_replace'
         72        SEND_VAL                                                 '%24'
         73        SEND_VAL                                                 ''
         74        SEND_VAR                                                 !10
         75        DO_ICALL                                         $69     
         76        CAST                                          5  ~70     $69
         77        SEND_VAL                                                 ~70
         78        SEND_VAL                                                 2
         79        DO_ICALL                                         $71     
         80        CONCAT                                           ~72     '%24', $71
         81        ASSIGN                                                   !10, ~72
   45    82        INIT_FCALL                                               'number_format'
         83        INIT_FCALL                                               'str_replace'
         84        SEND_VAL                                                 '%24'
         85        SEND_VAL                                                 ''
         86        SEND_VAR                                                 !12
         87        DO_ICALL                                         $74     
         88        CAST                                          5  ~75     $74
         89        SEND_VAL                                                 ~75
         90        SEND_VAL                                                 2
         91        DO_ICALL                                         $76     
         92        CONCAT                                           ~77     '%24', $76
         93        ASSIGN                                                   !12, ~77
   46    94        INIT_FCALL                                               'number_format'
         95        INIT_FCALL                                               'str_replace'
         96        SEND_VAL                                                 '%24'
         97        SEND_VAL                                                 ''
         98        SEND_VAR                                                 !17
         99        DO_ICALL                                         $79     
        100        CAST                                          5  ~80     $79
        101        SEND_VAL                                                 ~80
        102        SEND_VAL                                                 2
        103        DO_ICALL                                         $81     
        104        CONCAT                                           ~82     '%24', $81
        105        ASSIGN                                                   !17, ~82
   49   106        FETCH_CONSTANT                                   ~84     'AWS_TABLE_WIDTH'
        107        CONCAT                                           ~85     '%3Ctable+border%3D%220%22+cellpadding%3D%222%22+cellspacing%3D%220%22+width%3D%22', ~84
        108        CONCAT                                           ~86     ~85, '%22%3E'
        109        ECHO                                                     ~86
   50   110        CONCAT                                           ~87     '%3Ctr%3E%3Ctd+bgcolor%3D%22', !3
        111        CONCAT                                           ~88     ~87, '%22+width%3D%2285%25%22%3E'
        112        ECHO                                                     ~88
   51   113        CONCAT                                           ~89     '%3Ca+href%3D%22http%3A%2F%2Fshop.php9.com%2Fbooks.php%2FMode%2Fproduct%2FAsinSearch%2F', !7
        114        CONCAT                                           ~90     ~89, '%2Fname%2F'
        115        INIT_FCALL                                               'rawurlencode'
        116        SEND_VAR                                                 !8
        117        DO_ICALL                                         $91     
        118        CONCAT                                           ~92     ~90, $91
        119        CONCAT                                           ~93     ~92, '%22%3E%3Cb%3E'
        120        CONCAT                                           ~94     ~93, !8
        121        CONCAT                                           ~95     ~94, '%3C%2Fb%3E%3C%2Fa%3E'
        122        ECHO                                                     ~95
   52   123        ECHO                                                     '%3Cfont+size%3D%22-2%22%3E'
        124        ECHO                                                     !16
   53   125        CONCAT                                           ~96     '%3Cbr+%2F%3EList+Price%3A+%3Cb%3E%3Cfont+color%3D%22red%22%3E', !12
        126        CONCAT                                           ~97     ~96, '%3C%2Ffont%3E%3C%2Fb%3E'
        127        ECHO                                                     ~97
   54   128        CONCAT                                           ~98     '%26nbsp%3B+%26nbsp%3B+Amazon+Price%3A+%3Cb%3E%3Cfont+color%3D%22red%22%3E', !10
        129        CONCAT                                           ~99     ~98, '%3C%2Ffont%3E%3C%2Fb%3E'
        130        ECHO                                                     ~99
        131        ECHO                                                     !14
   55   132        CONCAT                                           ~100    '%26nbsp%3B+%26nbsp%3B+Used+Price%3A+%3Cb%3E%3Cfont+color%3D%22red%22%3E', !17
        133        CONCAT                                           ~101    ~100, '%3C%2Ffont%3E%3C%2Fb%3E'
        134        ECHO                                                     ~101
   56   135        ECHO                                                     '%26nbsp%3B+%26nbsp%3B+Publisher%3A+'
        136        ECHO                                                     !18
        137        CONCAT                                           ~102    '+%28', !19
        138        CONCAT                                           ~103    ~102, '%29'
        139        ECHO                                                     ~103
   57   140        CONCAT                                           ~104    '%3Cbr+%2F%3EBuy+from+%3Ca+href%3D%22', !0
        141        CONCAT                                           ~105    ~104, '%22%3E%3Cb%3E%3Cfont+color%3D%22red%22%3EAmazon.com%21%3C%2Ffont%3E%3C%2Fb%3E%3C%2Fa%3E'
        142        ECHO                                                     ~105
   58   143        CONCAT                                           ~106    '%26nbsp%3B%3Ca+href%3D%22http%3A%2F%2Fshop.php9.com%2Fbooks.php%2FMode%2Fproduct%2FAsinSearch%2F', !7
        144        CONCAT                                           ~107    ~106, '%2Fname%2F'
        145        INIT_FCALL                                               'rawurlencode'
        146        SEND_VAR                                                 !8
        147        DO_ICALL                                         $108    
        148        CONCAT                                           ~109    ~107, $108
        149        CONCAT                                           ~110    ~109, '%22%3E%3Cb%3E%3Cfont+color%3D%22red%22%3Eour+Top+Books+shop%21%3C%2Ffont%3E%3C%2Fb%3E%3C%2Fa%3E'
        150        ECHO                                                     ~110
   59   151        CONCAT                                           ~111    '%26nbsp%3B%3Ca+href%3D%22http%3A%2F%2Fshop.php9.com%2Fbooks.php%2FMode%2Fproduct%2FAsinSearch%2F', !7
        152        CONCAT                                           ~112    ~111, '%2Fname%2F'
        153        INIT_FCALL                                               'rawurlencode'
        154        SEND_VAR                                                 !8
        155        DO_ICALL                                         $113    
        156        CONCAT                                           ~114    ~112, $113
        157        CONCAT                                           ~115    ~114, '%22%3E%3Cb%3E%3Cfont+color%3D%22red%22%3Eour+Tech+Books+shop%21%3C%2Ffont%3E%3C%2Fb%3E%3C%2Fa%3E'
        158        ECHO                                                     ~115
   60   159        CONCAT                                           ~116    '%3C%2Ftd%3E%3Ctd+bgcolor%3D%22', !3
        160        CONCAT                                           ~117    ~116, '%22+width%3D%2215%25%22%3E'
        161        ECHO                                                     ~117
   61   162        ECHO                                                     !6
   62   163        ECHO                                                     '%3C%2Ftd%3E%3C%2Ftr%3E'
   63   164        ECHO                                                     '%3C%2Ftable%3E'
   67   165        ECHO                                                     '%3C%21--%0AScript+generated+with+the+Amazon+PHP+API+from+php9.com%0ATry+it+here%3A+http%3A%2F%2Fwww.php9.com%2Famazon.php%0A%2F%2F--%3E'
   70   166      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
199.83 ms | 1412 KiB | 21 Q