3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = <<<XML <row> <entry XY="1" al="23" se="5" ag="fgh"></entry> <entry XY="1" al="23" se="5" ag="fgh">Content1</entry> <entry XY="1" al="23" se="5" ag="fgh">Content2</entry> <entry XY="1" al="23" se="5" ag="fgh"> </entry> <entry XY="1" al="23" se="5" ag="fgh">Content3</entry> </row> XML; $xml = simplexml_load_string($x); //$y = $xml->xpath("//entry[not(text()) and (text()!=' ')]"); $y = $xml->xpath("//entry[text() and text()!=' ']"); foreach ($y as $a) echo $a;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/lN72Z
function name:  (null)
number of ops:  15
compiled vars:  !0 = $x, !1 = $xml, !2 = $y, !3 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Crow%3E%0A+++%3Centry+XY%3D%221%22+al%3D%2223%22+se%3D%225%22+ag%3D%22fgh%22%3E%3C%2Fentry%3E%0A+++%3Centry+XY%3D%221%22+al%3D%2223%22+se%3D%225%22+ag%3D%22fgh%22%3EContent1%3C%2Fentry%3E%0A+++%3Centry+XY%3D%221%22+al%3D%2223%22+se%3D%225%22+ag%3D%22fgh%22%3EContent2%3C%2Fentry%3E%0A+++%3Centry+XY%3D%221%22+al%3D%2223%22+se%3D%225%22+ag%3D%22fgh%22%3E+%3C%2Fentry%3E%0A+++%3Centry+XY%3D%221%22+al%3D%2223%22+se%3D%225%22+ag%3D%22fgh%22%3EContent3%3C%2Fentry%3E%0A%3C%2Frow%3E'
   12     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   16     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2F%2Fentry%5Btext%28%29+and+text%28%29%21%3D%27+%27%5D'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !2, $7
   18     9      > FE_RESET_R                                       $9      !2, ->13
         10    > > FE_FETCH_R                                               $9, !3, ->13
         11    >   ECHO                                                     !3
         12      > JMP                                                      ->10
         13    >   FE_FREE                                                  $9
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.08 ms | 1395 KiB | 15 Q