3v4l.org

run code in 300+ PHP versions simultaneously
<?php $XMLContent=file("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"); //the file is updated daily between 2.15 p.m. and 3.00 p.m. CET foreach($XMLContent as $line){ if(preg_match("/currency='([[:alpha:]]+)'/",$line,$currencyCode)){ if(preg_match("/rate='([[:graph:]]+)'/",$line,$rate)){ //Output the value of 1EUR for a currency code echo'1&euro;='.$rate[1].' '.$currencyCode[1].'<br/>'; //-------------------------------------------------- //Here you can add your code for inserting //$rate[1] and $currencyCode[1] into your database //-------------------------------------------------- } } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 26
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 26
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 25
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 25
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 25
Branch analysis from position: 25
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/A1rvZ
function name:  (null)
number of ops:  28
compiled vars:  !0 = $XMLContent, !1 = $line, !2 = $currencyCode, !3 = $rate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'file'
          1        SEND_VAL                                                 'http%3A%2F%2Fwww.ecb.europa.eu%2Fstats%2Feurofxref%2Feurofxref-daily.xml'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    5     4      > FE_RESET_R                                       $6      !0, ->26
          5    > > FE_FETCH_R                                               $6, !1, ->26
    6     6    >   INIT_FCALL                                               'preg_match'
          7        SEND_VAL                                                 '%2Fcurrency%3D%27%28%5B%5B%3Aalpha%3A%5D%5D%2B%29%27%2F'
          8        SEND_VAR                                                 !1
          9        SEND_REF                                                 !2
         10        DO_ICALL                                         $7      
         11      > JMPZ                                                     $7, ->25
    7    12    >   INIT_FCALL                                               'preg_match'
         13        SEND_VAL                                                 '%2Frate%3D%27%28%5B%5B%3Agraph%3A%5D%5D%2B%29%27%2F'
         14        SEND_VAR                                                 !1
         15        SEND_REF                                                 !3
         16        DO_ICALL                                         $8      
         17      > JMPZ                                                     $8, ->25
    9    18    >   FETCH_DIM_R                                      ~9      !3, 1
         19        CONCAT                                           ~10     '1%26euro%3B%3D', ~9
         20        CONCAT                                           ~11     ~10, '+'
         21        FETCH_DIM_R                                      ~12     !2, 1
         22        CONCAT                                           ~13     ~11, ~12
         23        CONCAT                                           ~14     ~13, '%3Cbr%2F%3E'
         24        ECHO                                                     ~14
    5    25    > > JMP                                                      ->5
         26    >   FE_FREE                                                  $6
   17    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.94 ms | 1396 KiB | 17 Q