3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<EOD <?xml version="1.0" encoding="UTF-8"?> <rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0"> <channel> <item> <pubDate>Mon, 25 Jan 2016 05:00:00 GMT</pubDate> <media:content medium="media.medium" href="<img src='http://res.cloudinary.com/cermati/image/upload/c_fill,h_300,w_300/ctjaru9g6c7lowxifxol' height='300' width='300'/>" height="300" width="300"> <media:thumbnail medium="media.thumb.medium" href="<img src='http://res.cloudinary.com/cermati/image/upload/c_thumb,h_120,w_120/ctjaru9g6c7lowxifxol' height='120' width='120'/>" height="120" width="120"/> </media:content> </item> </channel> </rss> EOD; $sxe = new SimpleXMLElement($xml); $sxe->registerXPathNamespace('c', 'http://example.org/chapter-title'); $result = $sxe->xpath('//c:title'); foreach ($result as $title) { echo $title . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/gMpc2
function name:  (null)
number of ops:  20
compiled vars:  !0 = $xml, !1 = $sxe, !2 = $result, !3 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Crss+xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22+xmlns%3Acontent%3D%22http%3A%2F%2Fpurl.org%2Frss%2F1.0%2Fmodules%2Fcontent%2F%22+xmlns%3Aatom%3D%22http%3A%2F%2Fwww.w3.org%2F2005%2FAtom%22+xmlns%3Amedia%3D%22http%3A%2F%2Fsearch.yahoo.com%2Fmrss%2F%22+version%3D%222.0%22%3E%0A%3Cchannel%3E%0A%3Citem%3E%0A%3CpubDate%3EMon%2C+25+Jan+2016+05%3A00%3A00+GMT%3C%2FpubDate%3E%0A%3Cmedia%3Acontent+medium%3D%22media.medium%22+href%3D%22%3Cimg+src%3D%27http%3A%2F%2Fres.cloudinary.com%2Fcermati%2Fimage%2Fupload%2Fc_fill%2Ch_300%2Cw_300%2Fctjaru9g6c7lowxifxol%27+height%3D%27300%27+width%3D%27300%27%2F%3E%22+height%3D%22300%22+width%3D%22300%22%3E%0A%3Cmedia%3Athumbnail+medium%3D%22media.thumb.medium%22+href%3D%22%3Cimg+src%3D%27http%3A%2F%2Fres.cloudinary.com%2Fcermati%2Fimage%2Fupload%2Fc_thumb%2Ch_120%2Cw_120%2Fctjaru9g6c7lowxifxol%27+height%3D%27120%27+width%3D%27120%27%2F%3E%22+height%3D%22120%22+width%3D%22120%22%2F%3E%0A%3C%2Fmedia%3Acontent%3E%0A%3C%2Fitem%3E%0A%3C%2Fchannel%3E%0A%3C%2Frss%3E'
   16     1        NEW                                              $5      'SimpleXMLElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $5
   18     5        INIT_METHOD_CALL                                         !1, 'registerXPathNamespace'
          6        SEND_VAL_EX                                              'c'
          7        SEND_VAL_EX                                              'http%3A%2F%2Fexample.org%2Fchapter-title'
          8        DO_FCALL                                      0          
   19     9        INIT_METHOD_CALL                                         !1, 'xpath'
         10        SEND_VAL_EX                                              '%2F%2Fc%3Atitle'
         11        DO_FCALL                                      0  $9      
         12        ASSIGN                                                   !2, $9
   21    13      > FE_RESET_R                                       $11     !2, ->18
         14    > > FE_FETCH_R                                               $11, !3, ->18
   22    15    >   CONCAT                                           ~12     !3, '%0A'
         16        ECHO                                                     ~12
   21    17      > JMP                                                      ->14
         18    >   FE_FREE                                                  $11
   23    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
209.33 ms | 1395 KiB | 13 Q