3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create DOM from URL or file include_once('simple_html_dom.php'); // Create DOM from URL or file $html = file_get_html('http://battlelog.battlefield.com/bf4/de/platoons/members/7973599489869481496/'); $myDiv = $html->find('div'); // wherever your the div you're ending up with is $children = $myDiv->children; // get an array of children foreach ($children AS $child) { $child->outertext = ''; // This removes the element, but MAY NOT remove it from the original $myDiv } echo $myDiv->innertext;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/BaF9o
function name:  (null)
number of ops:  20
compiled vars:  !0 = $html, !1 = $myDiv, !2 = $children, !3 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INCLUDE_OR_EVAL                                          'simple_html_dom.php', INCLUDE_ONCE
    7     1        INIT_FCALL_BY_NAME                                       'file_get_html'
          2        SEND_VAL_EX                                              'http%3A%2F%2Fbattlelog.battlefield.com%2Fbf4%2Fde%2Fplatoons%2Fmembers%2F7973599489869481496%2F'
          3        DO_FCALL                                      0  $5      
          4        ASSIGN                                                   !0, $5
   10     5        INIT_METHOD_CALL                                         !0, 'find'
          6        SEND_VAL_EX                                              'div'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !1, $7
   11     9        FETCH_OBJ_R                                      ~9      !1, 'children'
         10        ASSIGN                                                   !2, ~9
   12    11      > FE_RESET_R                                       $11     !2, ->16
         12    > > FE_FETCH_R                                               $11, !3, ->16
   13    13    >   ASSIGN_OBJ                                               !3, 'outertext'
         14        OP_DATA                                                  ''
   12    15      > JMP                                                      ->12
         16    >   FE_FREE                                                  $11
   15    17        FETCH_OBJ_R                                      ~13     !1, 'innertext'
         18        ECHO                                                     ~13
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.05 ms | 1394 KiB | 13 Q