3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<artists page="1" perPage="100" totalPages="253081" total="25308020"> <artist> <name>David Bowie</name> <playcount>151727648</playcount> <listeners>3969219</listeners> <mbid>5441c29d-3602-4898-b1a1-b77fa23b8e50</mbid> <url>http://www.last.fm/music/David+Bowie</url> <streamable>0</streamable> <image size="small"> http://img2-ak.lst.fm/i/u/34s/937d62bb145040b9b709319c1e680037.png </image> <image size="medium"> http://img2-ak.lst.fm/i/u/64s/937d62bb145040b9b709319c1e680037.png </image> <image size="large"> http://img2-ak.lst.fm/i/u/174s/937d62bb145040b9b709319c1e680037.png </image> <image size="extralarge"> http://img2-ak.lst.fm/i/u/300x300/937d62bb145040b9b709319c1e680037.png </image> <image size="mega"> http://img2-ak.lst.fm/i/u/937d62bb145040b9b709319c1e680037.png </image> </artist> <artist> <name>The Beatles</name> <playcount>456495139</playcount> <listeners>3986977</listeners> <mbid>b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d</mbid> <url>http://www.last.fm/music/The+Beatles</url> <streamable>0</streamable> <image size="small"> http://img2-ak.lst.fm/i/u/34s/55efc33bcd234fd8a1d65b3d49bf9661.png </image> <image size="medium"> http://img2-ak.lst.fm/i/u/64s/55efc33bcd234fd8a1d65b3d49bf9661.png </image> <image size="large"> http://img2-ak.lst.fm/i/u/174s/55efc33bcd234fd8a1d65b3d49bf9661.png </image> <image size="extralarge"> http://img2-ak.lst.fm/i/u/300x300/55efc33bcd234fd8a1d65b3d49bf9661.png </image> <image size="mega"> http://img2-ak.lst.fm/i/u/55efc33bcd234fd8a1d65b3d49bf9661.png </image> </artist> </artists>'; $doc = new DOMDocument(); $doc->loadXML($xml, LIBXML_PARSEHUGE); $artists = $doc->getElementsByTagName('artist'); foreach($artists as $artist) { $name = $artist>getElementsByTagName('name')->item(0)->nodeValue; var_dump($name); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 27
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 27
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/1W0uQ
function name:  (null)
number of ops:  29
compiled vars:  !0 = $xml, !1 = $doc, !2 = $artists, !3 = $artist, !4 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cartists+page%3D%221%22+perPage%3D%22100%22+totalPages%3D%22253081%22+total%3D%2225308020%22%3E%0A%3Cartist%3E%0A%3Cname%3EDavid+Bowie%3C%2Fname%3E%0A%3Cplaycount%3E151727648%3C%2Fplaycount%3E%0A%3Clisteners%3E3969219%3C%2Flisteners%3E%0A%3Cmbid%3E5441c29d-3602-4898-b1a1-b77fa23b8e50%3C%2Fmbid%3E%0A%3Curl%3Ehttp%3A%2F%2Fwww.last.fm%2Fmusic%2FDavid%2BBowie%3C%2Furl%3E%0A%3Cstreamable%3E0%3C%2Fstreamable%3E%0A%3Cimage+size%3D%22small%22%3E%0Ahttp%3A%2F%2Fimg2-ak.lst.fm%2Fi%2Fu%2F34s%2F937d62bb145040b9b709319c1e680037.png%0A%3C%2Fimage%3E%0A%3Cimage+size%3D%22medium%22%3E%0Ahttp%3A%2F%2Fimg2-ak.lst.fm%2Fi%2Fu%2F64s%2F937d62bb145040b9b709319c1e680037.png%0A%3C%2Fimage%3E%0A%3Cimage+size%3D%22large%22%3E%0Ahttp%3A%2F%2Fimg2-ak.lst.fm%2Fi%2Fu%2F174s%2F937d62bb145040b9b709319c1e680037.png%0A%3C%2Fimage%3E%0A%3Cimage+size%3D%22extralarge%22%3E%0Ahttp%3A%2F%2Fimg2-ak.lst.fm%2Fi%2Fu%2F300x300%2F937d62bb145040b9b709319c1e680037.png%0A%3C%2Fimage%3E%0A%3Cimage+size%3D%22mega%22%3E%0Ahttp%3A%2F%2Fimg2-ak.lst.fm%2Fi%2Fu%2F937d62bb145040b9b709319c1e680037.png%0A%3C%2Fimage%3E%0A%3C%2Fartist%3E%0A%3Cartist%3E%0A%3Cname%3EThe+Beatles%3C%2Fname%3E%0A%3Cplaycount%3E456495139%3C%2Fplaycount%3E%0A%3Clisteners%3E3986977%3C%2Flisteners%3E%0A%3Cmbid%3Eb10bbbfc-cf9e-42e0-be17-e2c3e1d2600d%3C%2Fmbid%3E%0A%3Curl%3Ehttp%3A%2F%2Fwww.last.fm%2Fmusic%2FThe%2BBeatles%3C%2Furl%3E%0A%3Cstreamable%3E0%3C%2Fstreamable%3E%0A%3Cimage+size%3D%22small%22%3E%0Ahttp%3A%2F%2Fimg2-ak.lst.fm%2Fi%2Fu%2F34s%2F55efc33bcd234fd8a1d65b3d49bf9661.png%0A%3C%2Fimage%3E%0A%3Cimage+size%3D%22medium%22%3E%0Ahttp%3A%2F%2Fimg2-ak.lst.fm%2Fi%2Fu%2F64s%2F55efc33bcd234fd8a1d65b3d49bf9661.png%0A%3C%2Fimage%3E%0A%3Cimage+size%3D%22large%22%3E%0Ahttp%3A%2F%2Fimg2-ak.lst.fm%2Fi%2Fu%2F174s%2F55efc33bcd234fd8a1d65b3d49bf9661.png%0A%3C%2Fimage%3E%0A%3Cimage+size%3D%22extralarge%22%3E%0Ahttp%3A%2F%2Fimg2-ak.lst.fm%2Fi%2Fu%2F300x300%2F55efc33bcd234fd8a1d65b3d49bf9661.png%0A%3C%2Fimage%3E%0A%3Cimage+size%3D%22mega%22%3E%0Ahttp%3A%2F%2Fimg2-ak.lst.fm%2Fi%2Fu%2F55efc33bcd234fd8a1d65b3d49bf9661.png%0A%3C%2Fimage%3E%0A%3C%2Fartist%3E%0A%3C%2Fartists%3E'
   52     1        NEW                                              $6      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
   53     4        INIT_METHOD_CALL                                         !1, 'loadXML'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAL_EX                                              524288
          7        DO_FCALL                                      0          
   54     8        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
          9        SEND_VAL_EX                                              'artist'
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !2, $10
   55    12      > FE_RESET_R                                       $12     !2, ->27
         13    > > FE_FETCH_R                                               $12, !3, ->27
   56    14    >   INIT_FCALL_BY_NAME                                       'getElementsByTagName'
         15        SEND_VAL_EX                                              'name'
         16        DO_FCALL                                      0  $13     
         17        INIT_METHOD_CALL                                         $13, 'item'
         18        SEND_VAL_EX                                              0
         19        DO_FCALL                                      0  $14     
         20        FETCH_OBJ_R                                      ~15     $14, 'nodeValue'
         21        IS_SMALLER                                       ~16     ~15, !3
         22        ASSIGN                                                   !4, ~16
   57    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                                 
   55    26      > JMP                                                      ->13
         27    >   FE_FREE                                                  $12
   58    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.57 ms | 1400 KiB | 15 Q