3v4l.org

run code in 300+ PHP versions simultaneously
<?php $price_page['response'] = ' <table border="0" cellspacing="1" cellpadding="0" width="100%"><tbody><tr><td width="20" nowrap="">&nbsp;</td><td colspan="7" align="center"><a href="/gold.londonfix.html" class="white">Click Here for Historical London Fix Prices</a></td><td>&nbsp;</td></tr><tr bgcolor="#E0E0E0"><td bgcolor="#000000">&nbsp;</td><td bgcolor="#F3F3E4">&nbsp; <a href="#" class="blackboldlink">LONDON FIX</a></td><td colspan="2" align="center" bgcolor="#F3F3E4"><p>Gold</p></td><td align="center" bgcolor="#F3F3E4"><p>Silver</p></td><td colspan="2" align="center" bgcolor="#F3F3E4"><p>Platinum</p></td><td colspan="2" align="center" bgcolor="#F3F3E4"><p>Palladium</p></td></tr><tr align="center" bgcolor="#DADADA"><td bgcolor="#000000">&nbsp;</td><td align="left" bgcolor="#CCCC99"><p>&nbsp;May 21, 2014</p></td><td nowrap="" bgcolor="#CCCC99" width="50"><p>AM</p></td><td nowrap="" bgcolor="#CCCC99" width="50"><p>PM</p></td><td nowrap="" bgcolor="#CCCC99" width="50"><p>-</p></td><td nowrap="" bgcolor="#CCCC99" width="50"><p>AM</p></td><td nowrap="" bgcolor="#CCCC99" width="50"><p>PM</p></td><td nowrap="" bgcolor="#CCCC99" width="50"><p>AM</p></td><td nowrap="" bgcolor="#CCCC99" width="50"><p>PM</p></td></tr><tr align="center" bgcolor="#E0E0E0"><td bgcolor="#000000">&nbsp;</td><td align="left" bgcolor="#F3F3E4"><p>&nbsp;<img src="/images/dollar.gif" width="12" height="12" alt="$"> USD</p></td><td bgcolor="#F3F3E4"><p>1292.00</p></td> <td bgcolor="#F3F3E4"> <p>NA </p></td><td bgcolor="#F3F3E4"><p>NA</p></td><td bgcolor="#F3F3E4"><p>1479.00</p></td> <td bgcolor="#F3F3E4"> <p>NA </p></td><td bgcolor="#F3F3E4"><p>828.00</p></td> <td bgcolor="#F3F3E4"> <p>NA </p></td></tr><tr align="center" bgcolor="#DADADA"><td bgcolor="#000000">&nbsp;</td><td align="left" bgcolor="#F3F3E4"><p>&nbsp;<img src="/images/pound.gif" width="12" height="12" alt="BP"> GBP</p></td><td bgcolor="#F3F3E4"><p>764.81</p></td> <td bgcolor="#F3F3E4"> <p>NA </p></td><td bgcolor="#F3F3E4"><p>NA</p></td> <td bgcolor="#F3F3E4"><p>874.90</p></td> <td bgcolor="#F3F3E4"> <p>NA </p></td> <td bgcolor="#F3F3E4"><p>489.80</p></td> <td bgcolor="#F3F3E4"> <p>NA </p></td></tr> <tr align="center" bgcolor="#DADADA"><td bgcolor="#000000">&nbsp;</td><td align="left" bgcolor="#F3F3E4"><p>&nbsp;<img src="/images/euro.gif" width="12" height="12" alt="E"> Euro</p></td><td bgcolor="#F3F3E4"><p>942.65</p></td> <td bgcolor="#F3F3E4"> <p>NA </p></td><td bgcolor="#F3F3E4"><p>NA</p></td><td bgcolor="#F3F3E4"><p>1078.40</p></td> <td bgcolor="#F3F3E4"> <p>NA </p></td><td bgcolor="#F3F3E4"><p>603.70</p></td> <td bgcolor="#F3F3E4"> <p>NA </p></td></tr></tbody></table> '; $bits = explode("London Fix Prices",$price_page['response']); $usd = explode("London Fix Prices",$price_page['response']); $bits = explode("GBP",$bits[1]); $bits = explode("Euro",$bits[1]); $bits = explode("</td>",$bits[0]); $usd = explode("USD",$usd[1]); $usd = explode("GBP",$usd[1]); $usd = explode("</td>",$usd[0]); echo trim(strip_tags($bits[3])); echo trim(strip_tags($bits[1])); if(count($bits) == 10){ if(is_numeric(trim(strip_tags($bits[3]))) && is_numeric(trim(strip_tags($bits[1])))){ echo $ag_lme = trim(strip_tags($bits[3]))/31.103; // in grams echo $au_lme = trim(strip_tags($bits[1]))/31.103; // in grams echo $au_lme_usd = trim(strip_tags($usd[1])); echo $ag_lme_usd = trim(strip_tags($usd[3])); } else{ echo $error = "Prices not collected from kitco.com1"; } } else{ echo $error = "Prices not collected from kitco.com2"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 134
Branch analysis from position: 69
2 jumps found. (Code = 46) Position 1 = 80, Position 2 = 91
Branch analysis from position: 80
2 jumps found. (Code = 43) Position 1 = 92, Position 2 = 131
Branch analysis from position: 92
1 jumps found. (Code = 42) Position 1 = 133
Branch analysis from position: 133
1 jumps found. (Code = 42) Position 1 = 136
Branch analysis from position: 136
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 131
1 jumps found. (Code = 42) Position 1 = 136
Branch analysis from position: 136
Branch analysis from position: 91
Branch analysis from position: 134
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0sAdl
function name:  (null)
number of ops:  137
compiled vars:  !0 = $price_page, !1 = $bits, !2 = $usd, !3 = $ag_lme, !4 = $au_lme, !5 = $au_lme_usd, !6 = $ag_lme_usd, !7 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN_DIM                                               !0, 'response'
          1        OP_DATA                                                  '%0A%3Ctable+border%3D%220%22+cellspacing%3D%221%22+cellpadding%3D%220%22+width%3D%22100%25%22%3E%3Ctbody%3E%3Ctr%3E%3Ctd+width%3D%2220%22+nowrap%3D%22%22%3E%26nbsp%3B%3C%2Ftd%3E%3Ctd+colspan%3D%227%22+align%3D%22center%22%3E%3Ca+href%3D%22%2Fgold.londonfix.html%22+class%3D%22white%22%3EClick%0A++++++++++++++++++Here+for+Historical+London+Fix+Prices%3C%2Fa%3E%3C%2Ftd%3E%3Ctd%3E%26nbsp%3B%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr+bgcolor%3D%22%23E0E0E0%22%3E%3Ctd+bgcolor%3D%22%23000000%22%3E%26nbsp%3B%3C%2Ftd%3E%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%26nbsp%3B+%3Ca+href%3D%22%23%22+class%3D%22blackboldlink%22%3ELONDON%0A++++++++++++++++++FIX%3C%2Fa%3E%3C%2Ftd%3E%3Ctd+colspan%3D%222%22+align%3D%22center%22+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3EGold%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+align%3D%22center%22+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3ESilver%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+colspan%3D%222%22+align%3D%22center%22+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3EPlatinum%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+colspan%3D%222%22+align%3D%22center%22+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3EPalladium%3C%2Fp%3E%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr+align%3D%22center%22+bgcolor%3D%22%23DADADA%22%3E%3Ctd+bgcolor%3D%22%23000000%22%3E%26nbsp%3B%3C%2Ftd%3E%3Ctd+align%3D%22left%22+bgcolor%3D%22%23CCCC99%22%3E%3Cp%3E%26nbsp%3BMay+21%2C+2014%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+nowrap%3D%22%22+bgcolor%3D%22%23CCCC99%22+width%3D%2250%22%3E%3Cp%3EAM%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+nowrap%3D%22%22+bgcolor%3D%22%23CCCC99%22+width%3D%2250%22%3E%3Cp%3EPM%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+nowrap%3D%22%22+bgcolor%3D%22%23CCCC99%22+width%3D%2250%22%3E%3Cp%3E-%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+nowrap%3D%22%22+bgcolor%3D%22%23CCCC99%22+width%3D%2250%22%3E%3Cp%3EAM%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+nowrap%3D%22%22+bgcolor%3D%22%23CCCC99%22+width%3D%2250%22%3E%3Cp%3EPM%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+nowrap%3D%22%22+bgcolor%3D%22%23CCCC99%22+width%3D%2250%22%3E%3Cp%3EAM%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+nowrap%3D%22%22+bgcolor%3D%22%23CCCC99%22+width%3D%2250%22%3E%3Cp%3EPM%3C%2Fp%3E%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr+align%3D%22center%22+bgcolor%3D%22%23E0E0E0%22%3E%3Ctd+bgcolor%3D%22%23000000%22%3E%26nbsp%3B%3C%2Ftd%3E%3Ctd+align%3D%22left%22+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3E%26nbsp%3B%3Cimg+src%3D%22%2Fimages%2Fdollar.gif%22+width%3D%2212%22+height%3D%2212%22+alt%3D%22%24%22%3E%0A++++++++++++++++++++USD%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3E1292.00%3C%2Fp%3E%3C%2Ftd%3E%0A%0A++++++++++++++++%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%0A++++++++++++++++++%3Cp%3ENA%0A++++++++++++++++%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3ENA%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3E1479.00%3C%2Fp%3E%3C%2Ftd%3E%0A++++++++++++++++%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%0A++++++++++++++++++%3Cp%3ENA%0A++++++++++++++++%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3E828.00%3C%2Fp%3E%3C%2Ftd%3E%0A++++++++++++++++%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%0A++++++++++++++++++%3Cp%3ENA%0A++++++++++++++++%3C%2Fp%3E%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr+align%3D%22center%22+bgcolor%3D%22%23DADADA%22%3E%3Ctd+bgcolor%3D%22%23000000%22%3E%26nbsp%3B%3C%2Ftd%3E%3Ctd+align%3D%22left%22+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3E%26nbsp%3B%3Cimg+src%3D%22%2Fimages%2Fpound.gif%22+width%3D%2212%22+height%3D%2212%22+alt%3D%22BP%22%3E%0A++++++++++++++++++++GBP%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3E764.81%3C%2Fp%3E%3C%2Ftd%3E%0A++++++++++++++++%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%0A++++++++++++++++++%3Cp%3ENA%0A++++++++++++++++%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3ENA%3C%2Fp%3E%3C%2Ftd%3E%0A++++++++++++++++%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3E874.90%3C%2Fp%3E%3C%2Ftd%3E%0A++++++++++++++++%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%0A++++++++++++++++++%3Cp%3ENA%0A++++++++++++++++%3C%2Fp%3E%3C%2Ftd%3E%0A++++++++++++++++%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3E489.80%3C%2Fp%3E%3C%2Ftd%3E%0A++++++++++++++++%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%0A++++++++++++++++++%3Cp%3ENA%0A++++++++++++++++%3C%2Fp%3E%3C%2Ftd%3E%3C%2Ftr%3E%0A++++++++++++++++%3Ctr+align%3D%22center%22+bgcolor%3D%22%23DADADA%22%3E%3Ctd+bgcolor%3D%22%23000000%22%3E%26nbsp%3B%3C%2Ftd%3E%3Ctd+align%3D%22left%22+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3E%26nbsp%3B%3Cimg+src%3D%22%2Fimages%2Feuro.gif%22+width%3D%2212%22+height%3D%2212%22+alt%3D%22E%22%3E%0A++++++++++++++++++++Euro%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3E942.65%3C%2Fp%3E%3C%2Ftd%3E%0A%0A++++++++++++++++%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%0A++++++++++++++++++%3Cp%3ENA%0A++++++++++++++++%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3ENA%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3E1078.40%3C%2Fp%3E%3C%2Ftd%3E%0A%0A++++++++++++++++%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%0A++++++++++++++++++%3Cp%3ENA%0A++++++++++++++++%3C%2Fp%3E%3C%2Ftd%3E%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%3Cp%3E603.70%3C%2Fp%3E%3C%2Ftd%3E%0A%0A++++++++++++++++%3Ctd+bgcolor%3D%22%23F3F3E4%22%3E%0A++++++++++++++++++%3Cp%3ENA%0A++++++++++++++++%3C%2Fp%3E%3C%2Ftd%3E%3C%2Ftr%3E%3C%2Ftbody%3E%3C%2Ftable%3E%0A%0A'
   53     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 'London+Fix+Prices'
          4        FETCH_DIM_R                                      ~9      !0, 'response'
          5        SEND_VAL                                                 ~9
          6        DO_ICALL                                         $10     
          7        ASSIGN                                                   !1, $10
   54     8        INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 'London+Fix+Prices'
         10        FETCH_DIM_R                                      ~12     !0, 'response'
         11        SEND_VAL                                                 ~12
         12        DO_ICALL                                         $13     
         13        ASSIGN                                                   !2, $13
   56    14        INIT_FCALL                                               'explode'
         15        SEND_VAL                                                 'GBP'
         16        FETCH_DIM_R                                      ~15     !1, 1
         17        SEND_VAL                                                 ~15
         18        DO_ICALL                                         $16     
         19        ASSIGN                                                   !1, $16
   57    20        INIT_FCALL                                               'explode'
         21        SEND_VAL                                                 'Euro'
         22        FETCH_DIM_R                                      ~18     !1, 1
         23        SEND_VAL                                                 ~18
         24        DO_ICALL                                         $19     
         25        ASSIGN                                                   !1, $19
   58    26        INIT_FCALL                                               'explode'
         27        SEND_VAL                                                 '%3C%2Ftd%3E'
         28        FETCH_DIM_R                                      ~21     !1, 0
         29        SEND_VAL                                                 ~21
         30        DO_ICALL                                         $22     
         31        ASSIGN                                                   !1, $22
   60    32        INIT_FCALL                                               'explode'
         33        SEND_VAL                                                 'USD'
         34        FETCH_DIM_R                                      ~24     !2, 1
         35        SEND_VAL                                                 ~24
         36        DO_ICALL                                         $25     
         37        ASSIGN                                                   !2, $25
   61    38        INIT_FCALL                                               'explode'
         39        SEND_VAL                                                 'GBP'
         40        FETCH_DIM_R                                      ~27     !2, 1
         41        SEND_VAL                                                 ~27
         42        DO_ICALL                                         $28     
         43        ASSIGN                                                   !2, $28
   62    44        INIT_FCALL                                               'explode'
         45        SEND_VAL                                                 '%3C%2Ftd%3E'
         46        FETCH_DIM_R                                      ~30     !2, 0
         47        SEND_VAL                                                 ~30
         48        DO_ICALL                                         $31     
         49        ASSIGN                                                   !2, $31
   64    50        INIT_FCALL                                               'trim'
         51        INIT_FCALL                                               'strip_tags'
         52        FETCH_DIM_R                                      ~33     !1, 3
         53        SEND_VAL                                                 ~33
         54        DO_ICALL                                         $34     
         55        SEND_VAR                                                 $34
         56        DO_ICALL                                         $35     
         57        ECHO                                                     $35
   65    58        INIT_FCALL                                               'trim'
         59        INIT_FCALL                                               'strip_tags'
         60        FETCH_DIM_R                                      ~36     !1, 1
         61        SEND_VAL                                                 ~36
         62        DO_ICALL                                         $37     
         63        SEND_VAR                                                 $37
         64        DO_ICALL                                         $38     
         65        ECHO                                                     $38
   67    66        COUNT                                            ~39     !1
         67        IS_EQUAL                                                 ~39, 10
         68      > JMPZ                                                     ~40, ->134
   68    69    >   INIT_FCALL                                               'is_numeric'
         70        INIT_FCALL                                               'trim'
         71        INIT_FCALL                                               'strip_tags'
         72        FETCH_DIM_R                                      ~41     !1, 3
         73        SEND_VAL                                                 ~41
         74        DO_ICALL                                         $42     
         75        SEND_VAR                                                 $42
         76        DO_ICALL                                         $43     
         77        SEND_VAR                                                 $43
         78        DO_ICALL                                         $44     
         79      > JMPZ_EX                                          ~45     $44, ->91
         80    >   INIT_FCALL                                               'is_numeric'
         81        INIT_FCALL                                               'trim'
         82        INIT_FCALL                                               'strip_tags'
         83        FETCH_DIM_R                                      ~46     !1, 1
         84        SEND_VAL                                                 ~46
         85        DO_ICALL                                         $47     
         86        SEND_VAR                                                 $47
         87        DO_ICALL                                         $48     
         88        SEND_VAR                                                 $48
         89        DO_ICALL                                         $49     
         90        BOOL                                             ~45     $49
         91    > > JMPZ                                                     ~45, ->131
   69    92    >   INIT_FCALL                                               'trim'
         93        INIT_FCALL                                               'strip_tags'
         94        FETCH_DIM_R                                      ~50     !1, 3
         95        SEND_VAL                                                 ~50
         96        DO_ICALL                                         $51     
         97        SEND_VAR                                                 $51
         98        DO_ICALL                                         $52     
         99        DIV                                              ~53     $52, 31.103
        100        ASSIGN                                           ~54     !3, ~53
        101        ECHO                                                     ~54
   70   102        INIT_FCALL                                               'trim'
        103        INIT_FCALL                                               'strip_tags'
        104        FETCH_DIM_R                                      ~55     !1, 1
        105        SEND_VAL                                                 ~55
        106        DO_ICALL                                         $56     
        107        SEND_VAR                                                 $56
        108        DO_ICALL                                         $57     
        109        DIV                                              ~58     $57, 31.103
        110        ASSIGN                                           ~59     !4, ~58
        111        ECHO                                                     ~59
   71   112        INIT_FCALL                                               'trim'
        113        INIT_FCALL                                               'strip_tags'
        114        FETCH_DIM_R                                      ~60     !2, 1
        115        SEND_VAL                                                 ~60
        116        DO_ICALL                                         $61     
        117        SEND_VAR                                                 $61
        118        DO_ICALL                                         $62     
        119        ASSIGN                                           ~63     !5, $62
        120        ECHO                                                     ~63
   72   121        INIT_FCALL                                               'trim'
        122        INIT_FCALL                                               'strip_tags'
        123        FETCH_DIM_R                                      ~64     !2, 3
        124        SEND_VAL                                                 ~64
        125        DO_ICALL                                         $65     
        126        SEND_VAR                                                 $65
        127        DO_ICALL                                         $66     
        128        ASSIGN                                           ~67     !6, $66
        129        ECHO                                                     ~67
        130      > JMP                                                      ->133
   75   131    >   ASSIGN                                           ~68     !7, 'Prices+not+collected+from+kitco.com1'
        132        ECHO                                                     ~68
        133    > > JMP                                                      ->136
   79   134    >   ASSIGN                                           ~69     !7, 'Prices+not+collected+from+kitco.com2'
        135        ECHO                                                     ~69
   80   136    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.04 ms | 1412 KiB | 21 Q