3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <nowplaying-info-list> <nowplaying-info > <property name="track_title"><![CDATA[Song Title]]></property> <property name="track_album_name"><![CDATA[Song Album]]></property> <property name="track_artist_name"><![CDATA[Song Artist]]></property> </nowplaying-info> </nowplaying-info-list> XML; $sxml = simplexml_load_string($xml); $results = $sxml->xpath("/nowplaying-info-list/nowplaying-info/property[@name='track_artist_name']"); $artist = (string) $results[0]; echo $artist;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eH4Dr
function name:  (null)
number of ops:  14
compiled vars:  !0 = $xml, !1 = $sxml, !2 = $results, !3 = $artist
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cnowplaying-info-list%3E%0A++%3Cnowplaying-info+%3E%0A++++%3Cproperty+name%3D%22track_title%22%3E%3C%21%5BCDATA%5BSong+Title%5D%5D%3E%3C%2Fproperty%3E%0A++++%3Cproperty+name%3D%22track_album_name%22%3E%3C%21%5BCDATA%5BSong+Album%5D%5D%3E%3C%2Fproperty%3E%0A++++%3Cproperty+name%3D%22track_artist_name%22%3E%3C%21%5BCDATA%5BSong+Artist%5D%5D%3E%3C%2Fproperty%3E%0A++%3C%2Fnowplaying-info%3E%0A%3C%2Fnowplaying-info-list%3E'
   12     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   14     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2Fnowplaying-info-list%2Fnowplaying-info%2Fproperty%5B%40name%3D%27track_artist_name%27%5D'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !2, $7
   16     9        FETCH_DIM_R                                      ~9      !2, 0
         10        CAST                                          6  ~10     ~9
         11        ASSIGN                                                   !3, ~10
   17    12        ECHO                                                     !3
   18    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.3 ms | 1001 KiB | 14 Q