3v4l.org

run code in 500+ PHP versions simultaneously
<?php $html = '<p><a href="blahblah">blahblah</a></p>'; $doc = new DOMDocument(); libxml_use_internal_errors(true); $doc->loadHTML($html); libxml_clear_errors(); $test = $doc->querySelector('a'); echo $test->getAttribute('href');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q9VDR
function name:  (null)
number of ops:  21
compiled vars:  !0 = $html, !1 = $doc, !2 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%3Cp%3E%3Ca+href%3D%22blahblah%22%3Eblahblah%3C%2Fa%3E%3C%2Fp%3E'
    5     1        NEW                                                  $4      'DOMDocument'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !1, $4
    6     4        INIT_FCALL                                                   'libxml_use_internal_errors'
          5        SEND_VAL                                                     <true>
          6        DO_ICALL                                                     
    7     7        INIT_METHOD_CALL                                             !1, 'loadHTML'
          8        SEND_VAR_EX                                                  !0
          9        DO_FCALL                                          0          
    8    10        INIT_FCALL                                                   'libxml_clear_errors'
         11        DO_ICALL                                                     
   11    12        INIT_METHOD_CALL                                             !1, 'querySelector'
         13        SEND_VAL_EX                                                  'a'
         14        DO_FCALL                                          0  $10     
         15        ASSIGN                                                       !2, $10
   12    16        INIT_METHOD_CALL                                             !2, 'getAttribute'
         17        SEND_VAL_EX                                                  'href'
         18        DO_FCALL                                          0  $12     
         19        ECHO                                                         $12
         20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.79 ms | 1297 KiB | 15 Q