3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <meta name="rows" content="barry" session="fooey" /> HTML; $zs = 'fooey'; $dom = new DOMDocument; $dom->loadHTML($html); echo (new DOMXPath($dom))->evaluate('string(//meta[@session="' . $zs. '"]/@content)');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FHhuC
function name:  (null)
number of ops:  18
compiled vars:  !0 = $html, !1 = $zs, !2 = $dom
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cmeta+name%3D%22rows%22+content%3D%22barry%22+session%3D%22fooey%22+%2F%3E'
    6     1        ASSIGN                                                   !1, 'fooey'
    8     2        NEW                                              $5      'DOMDocument'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $5
    9     5        INIT_METHOD_CALL                                         !2, 'loadHTML'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
   10     8        NEW                                              $9      'DOMXPath'
          9        SEND_VAR_EX                                              !2
         10        DO_FCALL                                      0          
         11        INIT_METHOD_CALL                                         $9, 'evaluate'
         12        CONCAT                                           ~11     'string%28%2F%2Fmeta%5B%40session%3D%22', !1
         13        CONCAT                                           ~12     ~11, '%22%5D%2F%40content%29'
         14        SEND_VAL_EX                                              ~12
         15        DO_FCALL                                      0  $13     
         16        ECHO                                                     $13
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.1 ms | 1404 KiB | 13 Q