3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); echo "<?xml version='1.0' encoding='UTF-8'?> <urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>"; $db = JFactory::getDbo(); $query = "SELECT * FROM #__sh404sef_urls ORDER BY oldurl ASC"; $db->setQuery($query); $rows = $db->loadObjectList(); foreach ($rows as $row) { $SEFedurl = $row->oldurl; $date = date("Y-m-d"); $line = "<url> <loc>http://" . $_SERVER['HTTP_HOST'] . "/$SEFedurl</loc> <priority>1.00</priority> <changefreq>weekly</changefreq> <lastmod>$date</lastmod> </url>"; echo $line; } echo "</urlset>"; //mysqli_close($dbc); $toWrite = ob_get_clean(); $toWrite; // data generated from form, formatted to XML $fp = fopen('sitemap.xml', 'w'); fwrite($fp, $toWrite); fclose($fp); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 33
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 33
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/PVVUa
function name:  (null)
number of ops:  51
compiled vars:  !0 = $db, !1 = $query, !2 = $rows, !3 = $row, !4 = $SEFedurl, !5 = $date, !6 = $line, !7 = $toWrite, !8 = $fp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'ob_start'
          1        DO_ICALL                                                 
    7     2        ECHO                                                     '%3C%3Fxml+version%3D%271.0%27+encoding%3D%27UTF-8%27%3F%3E%0A%09%09%3Curlset+xmlns%3D%27http%3A%2F%2Fwww.sitemaps.org%2Fschemas%2Fsitemap%2F0.9%27%3E'
   10     3        INIT_STATIC_METHOD_CALL                                  'JFactory', 'getDbo'
          4        DO_FCALL                                      0  $10     
          5        ASSIGN                                                   !0, $10
   11     6        ASSIGN                                                   !1, 'SELECT+%2A+FROM+%23__sh404sef_urls+ORDER+BY+oldurl+ASC'
   12     7        INIT_METHOD_CALL                                         !0, 'setQuery'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
   13    10        INIT_METHOD_CALL                                         !0, 'loadObjectList'
         11        DO_FCALL                                      0  $14     
         12        ASSIGN                                                   !2, $14
   15    13      > FE_RESET_R                                       $16     !2, ->33
         14    > > FE_FETCH_R                                               $16, !3, ->33
   17    15    >   FETCH_OBJ_R                                      ~17     !3, 'oldurl'
         16        ASSIGN                                                   !4, ~17
   18    17        INIT_FCALL                                               'date'
         18        SEND_VAL                                                 'Y-m-d'
         19        DO_ICALL                                         $19     
         20        ASSIGN                                                   !5, $19
   22    21        FETCH_R                      global              ~21     '_SERVER'
         22        FETCH_DIM_R                                      ~22     ~21, 'HTTP_HOST'
         23        CONCAT                                           ~23     '%3Curl%3E%0A%09%3Cloc%3Ehttp%3A%2F%2F', ~22
         24        ROPE_INIT                                     5  ~25     '%2F'
         25        ROPE_ADD                                      1  ~25     ~25, !4
         26        ROPE_ADD                                      2  ~25     ~25, '%3C%2Floc%3E%0A%09%3Cpriority%3E1.00%3C%2Fpriority%3E%0A%09%3Cchangefreq%3Eweekly%3C%2Fchangefreq%3E%0A%09%3Clastmod%3E'
   25    27        ROPE_ADD                                      3  ~25     ~25, !5
         28        ROPE_END                                      4  ~24     ~25, '%3C%2Flastmod%3E++%0A%3C%2Furl%3E'
         29        CONCAT                                           ~28     ~23, ~24
   21    30        ASSIGN                                                   !6, ~28
   28    31        ECHO                                                     !6
   15    32      > JMP                                                      ->14
         33    >   FE_FREE                                                  $16
   35    34        ECHO                                                     '%3C%2Furlset%3E'
   39    35        INIT_FCALL                                               'ob_get_clean'
         36        DO_ICALL                                         $30     
         37        ASSIGN                                                   !7, $30
   44    38        INIT_FCALL                                               'fopen'
         39        SEND_VAL                                                 'sitemap.xml'
         40        SEND_VAL                                                 'w'
         41        DO_ICALL                                         $32     
         42        ASSIGN                                                   !8, $32
   45    43        INIT_FCALL                                               'fwrite'
         44        SEND_VAR                                                 !8
         45        SEND_VAR                                                 !7
         46        DO_ICALL                                                 
   46    47        INIT_FCALL                                               'fclose'
         48        SEND_VAR                                                 !8
         49        DO_ICALL                                                 
   49    50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.45 ms | 1400 KiB | 25 Q