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()]"); var_dump($y);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/abi7R
function name:  (null)
number of ops:  13
compiled vars:  !0 = $x, !1 = $xml, !2 = $y
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                                         $4      
          4        ASSIGN                                                   !1, $4
   16     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2F%2Fentry%5Btext%28%29%5D'
          7        DO_FCALL                                      0  $6      
          8        ASSIGN                                                   !2, $6
   18     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.17 ms | 1386 KiB | 17 Q