3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new DomDocument(); $dom->loadHTMLFile('http://www.disneymovierewards.go.com/rewards/browse/points/1301-2800?page=1&sort=undefined&cat=_all&pnt=1301-2800&brd=_all'); $xpath = new DOMXpath($dom); $masterNode = $xpath->query('//div[@class="class"]'); #It returns DOMNodeList obj # Now from master node we gonna pick what we want. # Also, $masterNode->item(1) is a context for this query. $paragraphNodes = $xpath->query('p', $masterNode->item(0)); foreach ($paragraphNodes as $paragraphElement) { echo $paragraphElement->nodeValue . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/GNQfZ
function name:  (null)
number of ops:  30
compiled vars:  !0 = $dom, !1 = $xpath, !2 = $masterNode, !3 = $paragraphNodes, !4 = $paragraphElement
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $5      'DomDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $5
    6     3        INIT_METHOD_CALL                                         !0, 'loadHTMLFile'
          4        SEND_VAL_EX                                              'http%3A%2F%2Fwww.disneymovierewards.go.com%2Frewards%2Fbrowse%2Fpoints%2F1301-2800%3Fpage%3D1%26sort%3Dundefined%26cat%3D_all%26pnt%3D1301-2800%26brd%3D_all'
          5        DO_FCALL                                      0          
    7     6        NEW                                              $9      'DOMXpath'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $9
    8    10        INIT_METHOD_CALL                                         !1, 'query'
         11        SEND_VAL_EX                                              '%2F%2Fdiv%5B%40class%3D%22class%22%5D'
         12        DO_FCALL                                      0  $12     
         13        ASSIGN                                                   !2, $12
   12    14        INIT_METHOD_CALL                                         !1, 'query'
         15        SEND_VAL_EX                                              'p'
         16        INIT_METHOD_CALL                                         !2, 'item'
         17        SEND_VAL_EX                                              0
         18        DO_FCALL                                      0  $14     
         19        SEND_VAR_NO_REF_EX                                       $14
         20        DO_FCALL                                      0  $15     
         21        ASSIGN                                                   !3, $15
   14    22      > FE_RESET_R                                       $17     !3, ->28
         23    > > FE_FETCH_R                                               $17, !4, ->28
   15    24    >   FETCH_OBJ_R                                      ~18     !4, 'nodeValue'
         25        CONCAT                                           ~19     ~18, '%0A'
         26        ECHO                                                     ~19
   14    27      > JMP                                                      ->23
         28    >   FE_FREE                                                  $17
   16    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.01 ms | 1395 KiB | 13 Q