3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = "<h1>รก</h1>"; echo "before: ".$html; $dom = new DOMDocument(); $dom->loadHTML($html); $xpath = new DOMXPath($dom); $html=$dom->saveHTML(); echo " after: ".$html;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ajkYH
function name:  (null)
number of ops:  19
compiled vars:  !0 = $html, !1 = $dom, !2 = $xpath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Ch1%3E%C3%A1%3C%2Fh1%3E'
    4     1        CONCAT                                           ~4      'before%3A+', !0
          2        ECHO                                                     ~4
    6     3        NEW                                              $5      'DOMDocument'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
    7     6        INIT_METHOD_CALL                                         !1, 'loadHTML'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
    8     9        NEW                                              $9      'DOMXPath'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $9
    9    13        INIT_METHOD_CALL                                         !1, 'saveHTML'
         14        DO_FCALL                                      0  $12     
         15        ASSIGN                                                   !0, $12
   11    16        CONCAT                                           ~14     '+after%3A+', !0
         17        ECHO                                                     ~14
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.03 ms | 1393 KiB | 13 Q