3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstring = '<html><p>8. Attacked<span style="white-space: pre;"> </span></p> <p>9. Quiet Buzz</p> <p>&nbsp;</p></html>'; $doc = new DOMDocument(); $doc->loadHTML($xmlstring); $xpath = new DOMXpath($doc); foreach($xpath->query("//*[normalize-space(text()) != '']") as $child) { var_dump($child->nodeValue); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 21
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/FRqub
function name:  (null)
number of ops:  23
compiled vars:  !0 = $xmlstring, !1 = $doc, !2 = $xpath, !3 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Chtml%3E%3Cp%3E8.+Attacked%3Cspan+style%3D%22white-space%3A+pre%3B%22%3E+%3C%2Fspan%3E%3C%2Fp%3E%0A%3Cp%3E9.+Quiet+Buzz%3C%2Fp%3E%0A%3Cp%3E%26nbsp%3B%3C%2Fp%3E%3C%2Fhtml%3E'
    6     1        NEW                                              $5      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $5
    7     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
    8     7        NEW                                              $9      'DOMXpath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $9
    9    11        INIT_METHOD_CALL                                         !2, 'query'
         12        SEND_VAL_EX                                              '%2F%2F%2A%5Bnormalize-space%28text%28%29%29+%21%3D+%27%27%5D'
         13        DO_FCALL                                      0  $12     
         14      > FE_RESET_R                                       $13     $12, ->21
         15    > > FE_FETCH_R                                               $13, !3, ->21
   10    16    >   INIT_FCALL                                               'var_dump'
         17        FETCH_OBJ_R                                      ~14     !3, 'nodeValue'
         18        SEND_VAL                                                 ~14
         19        DO_ICALL                                                 
    9    20      > JMP                                                      ->15
         21    >   FE_FREE                                                  $13
   11    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.48 ms | 1395 KiB | 15 Q