3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Lorem ipsum dolor sit amet, adipisicing <img src="http://example.com/img.jpg" />consequat.'; $dom = new DOMDocument; $dom->loadHTML($str); echo (new DOMXPath($dom))->evaluate('string(//img/@src)');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MHCIa
function name:  (null)
number of ops:  15
compiled vars:  !0 = $str, !1 = $dom
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Lorem+ipsum+dolor+sit+amet%2C+adipisicing+%3Cimg+src%3D%22http%3A%2F%2Fexample.com%2Fimg.jpg%22+%2F%3Econsequat.'
    5     1        NEW                                              $3      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
    6     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
    7     7        NEW                                              $7      'DOMXPath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        INIT_METHOD_CALL                                         $7, 'evaluate'
         11        SEND_VAL_EX                                              'string%28%2F%2Fimg%2F%40src%29'
         12        DO_FCALL                                      0  $9      
         13        ECHO                                                     $9
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.08 ms | 993 KiB | 13 Q