3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml=simplexml_load_string(<<<XML <feed> <entry> <id>1980475</id> <link rel="post" href="http://..."></link> <link rel="edit" href="http://..."></link> <link rel="alternate" href="http://..."></link> </entry> <entry> <id>1980476</id> <link rel="post" href="http://..."></link> <link rel="edit" href="http://..."></link> <link rel="alternate" href="http://..."> <lo> naiya </lo> </link> </entry> </feed> XML ); echo count($xml->xpath('//link[@rel="alternate"]')); $node = $xml->xpath('//link[@rel="alternate"]'); echo $node;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DAX2v
function name:  (null)
number of ops:  15
compiled vars:  !0 = $xml, !1 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'simplexml_load_string'
    3     1        SEND_VAL                                                 '%3Cfeed%3E%0A++++%3Centry%3E%0A++++++++%3Cid%3E1980475%3C%2Fid%3E%0A++++++++%3Clink+rel%3D%22post%22+href%3D%22http%3A%2F%2F...%22%3E%3C%2Flink%3E%0A++++++++%3Clink+rel%3D%22edit%22+href%3D%22http%3A%2F%2F...%22%3E%3C%2Flink%3E%0A++++++++%3Clink+rel%3D%22alternate%22+href%3D%22http%3A%2F%2F...%22%3E%3C%2Flink%3E%0A++++%3C%2Fentry%3E%0A++++%3Centry%3E%0A++++++++%3Cid%3E1980476%3C%2Fid%3E%0A++++++++%3Clink+rel%3D%22post%22+href%3D%22http%3A%2F%2F...%22%3E%3C%2Flink%3E%0A++++++++%3Clink+rel%3D%22edit%22+href%3D%22http%3A%2F%2F...%22%3E%3C%2Flink%3E%0A++++++++%3Clink+rel%3D%22alternate%22+href%3D%22http%3A%2F%2F...%22%3E%0A++++++++%3Clo%3E++naiya+%3C%2Flo%3E++++++%0A++++++++%3C%2Flink%3E%0A++++%3C%2Fentry%3E%0A%3C%2Ffeed%3E'
          2        DO_ICALL                                         $2      
    2     3        ASSIGN                                                   !0, $2
   21     4        INIT_METHOD_CALL                                         !0, 'xpath'
          5        SEND_VAL_EX                                              '%2F%2Flink%5B%40rel%3D%22alternate%22%5D'
          6        DO_FCALL                                      0  $4      
          7        COUNT                                            ~5      $4
          8        ECHO                                                     ~5
   22     9        INIT_METHOD_CALL                                         !0, 'xpath'
         10        SEND_VAL_EX                                              '%2F%2Flink%5B%40rel%3D%22alternate%22%5D'
         11        DO_FCALL                                      0  $6      
         12        ASSIGN                                                   !1, $6
   24    13        ECHO                                                     !1
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.64 ms | 1395 KiB | 15 Q