3v4l.org

run code in 200+ PHP versions simultaneously
<?php $html = '<div class="h1">2008 Honda Accord Coupe<small> — Wuse II</small></div>'; $dom = new DomDocument(); $dom->loadHtml($html); $xpath = new DomXPath($dom); print $xpath->evaluate("string(//div[@class='h1']/text())");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/otuOK
function name:  (null)
number of ops:  16
compiled vars:  !0 = $html, !1 = $dom, !2 = $xpath
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   QM_ASSIGN                                                !0
   4     1        NEW                                              $4      :26
         2        DO_FCALL                                      0          
         3        QM_ASSIGN                                                !1
   5     4        INIT_METHOD_CALL                                         !1, 'loadHtml'
         5        SEND_VAR_EX                                              !0
         6        DO_FCALL                                      0          
   6     7        NEW                                              $8      :18
         8        SEND_VAR_EX                                              !1
         9        DO_FCALL                                      0          
        10        QM_ASSIGN                                                !2
   7    11        INIT_METHOD_CALL                                         !2, 'evaluate'
        12        SEND_VAL_EX                                              'string%28%2F%2Fdiv%5B%40class%3D%27h1%27%5D%2Ftext%28%29%29'
        13        DO_FCALL                                      0  $11     
        14        ASSIGN_OBJ                                               $11
        15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.4.0