3v4l.org

run code in 300+ PHP versions simultaneously
<?php $document = <<<EOD <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head> <body> < </body> </html> EOD; $dom = new \DOMDocument(); $dom->loadHTML($document, LIBXML_NOBLANKS); echo $dom->textContent . PHP_EOL; echo LIBXML_DOTTED_VERSION;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bBP3r
function name:  (null)
number of ops:  13
compiled vars:  !0 = $document, !1 = $dom
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%21DOCTYPE+html+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+XHTML+1.0+Strict%2F%2FEN%22+%22http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml1%2FDTD%2Fxhtml1-strict.dtd%22%3E%0A%3Chtml+xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%0A%3Chead%3E%3Cmeta+http-equiv%3D%22Content-Type%22+content%3D%22text%2Fhtml%3B+charset%3Dutf-8%22+%2F%3E%3C%2Fhead%3E%0A%3Cbody%3E%0A%3C%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   12     1        NEW                                              $3      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   13     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAL_EX                                              256
          7        DO_FCALL                                      0          
   14     8        FETCH_OBJ_R                                      ~7      !1, 'textContent'
          9        CONCAT                                           ~8      ~7, '%0A'
         10        ECHO                                                     ~8
   16    11        ECHO                                                     '2.9.4'
   17    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.07 ms | 996 KiB | 13 Q