3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = " <meta charset='UTF-8'> <meta name='keywords' content='your, tags'> <meta name='description' content='150 words'> <meta name='subject' content='your website's subject'> <meta name='copyright' content='company name'> <meta name='language' content='ES'> <meta name='robots' content='index,follow'> <meta name='revised' content='Sunday, July 18th, 2010, 5:15 pm'> <meta name='abstract' content=''> <meta name='topic' content=''> <meta name='summary' content=''> <meta name='Classification' content='Business'> <meta name='author' content='name, email@hotmail.com'> <meta name='designer' content=''> <meta name='reply-to' content='email@hotmail.com'> <meta name='owner' content=''> <meta name='url' content='http://www.websiteaddrress.com'> <meta name='identifier-URL' content='http://www.websiteaddress.com'> <meta name='directory' content='submission'> <meta name='pagename' content='jQuery Tools, Tutorials and Resources - O'Reilly Media'> <meta name='category' content=''> <meta name='coverage' content='Worldwide'> <meta name='distribution' content='Global'> <meta name='rating' content='General'> <meta name='revisit-after' content='7 days'> <meta name='subtitle' content='This is my subtitle'> <meta name='target' content='all'> <meta name='HandheldFriendly' content='True'> <meta name='MobileOptimized' content='320'> <meta name='date' content='Sep. 27, 2010'> <meta name='search_date' content='2010-09-27'> <meta name='DC.title' content='Unstoppable Robot Ninja'> <meta name='ResourceLoaderDynamicStyles' content=''> <meta name='medium' content='blog'> <meta name='syndication-source' content='https://mashable.com/2008/12/24/free-brand-monitoring-tools/'> <meta name='original-source' content='https://mashable.com/2008/12/24/free-brand-monitoring-tools/'> <meta name='verify-v1' content='dV1r/ZJJdDEI++fKJ6iDEl6o+TMNtSu0kv18ONeqM0I='> <meta name='y_key' content='1e39c508e0d87750'> <meta name='pageKey' content='guest-home'> <meta itemprop='name' content='jQTouch'> <meta http-equiv='Expires' content='0'> <meta http-equiv='Pragma' content='no-cache'> <meta http-equiv='Cache-Control' content='no-cache'> <meta http-equiv='imagetoolbar' content='no'> <meta http-equiv='x-dns-prefetch-control' content='off'>"; $dom = new DOMDocument(); libxml_use_internal_errors(true); // silence warnings $dom->loadHTML($html); $xpath = new DOMXPath($dom); $result = []; foreach ($xpath->query("//meta[(@name or @http-equiv) and @content]") as $node) { $result[] = [ 'attr' => $node->getAttribute($node->hasAttribute('name') ? 'name' : 'http-equiv'), 'content' => $node->getAttribute('content') ]; } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 38
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 38
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/OVeJv
function name:  (null)
number of ops:  43
compiled vars:  !0 = $html, !1 = $dom, !2 = $xpath, !3 = $result, !4 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%0A%3Cmeta+charset%3D%27UTF-8%27%3E%0A%3Cmeta+name%3D%27keywords%27+content%3D%27your%2C+tags%27%3E%0A%3Cmeta+name%3D%27description%27+content%3D%27150+words%27%3E%0A%3Cmeta+name%3D%27subject%27+content%3D%27your+website%27s+subject%27%3E%0A%3Cmeta+name%3D%27copyright%27+content%3D%27company+name%27%3E%0A%3Cmeta+name%3D%27language%27+content%3D%27ES%27%3E%0A%3Cmeta+name%3D%27robots%27+content%3D%27index%2Cfollow%27%3E%0A%3Cmeta+name%3D%27revised%27+content%3D%27Sunday%2C+July+18th%2C+2010%2C+5%3A15+pm%27%3E%0A%3Cmeta+name%3D%27abstract%27+content%3D%27%27%3E%0A%3Cmeta+name%3D%27topic%27+content%3D%27%27%3E%0A%3Cmeta+name%3D%27summary%27+content%3D%27%27%3E%0A%3Cmeta+name%3D%27Classification%27+content%3D%27Business%27%3E%0A%3Cmeta+name%3D%27author%27+content%3D%27name%2C+email%40hotmail.com%27%3E%0A%3Cmeta+name%3D%27designer%27+content%3D%27%27%3E%0A%3Cmeta+name%3D%27reply-to%27+content%3D%27email%40hotmail.com%27%3E%0A%3Cmeta+name%3D%27owner%27+content%3D%27%27%3E%0A%3Cmeta+name%3D%27url%27+content%3D%27http%3A%2F%2Fwww.websiteaddrress.com%27%3E%0A%3Cmeta+name%3D%27identifier-URL%27+content%3D%27http%3A%2F%2Fwww.websiteaddress.com%27%3E%0A%3Cmeta+name%3D%27directory%27+content%3D%27submission%27%3E%0A%3Cmeta+name%3D%27pagename%27+content%3D%27jQuery+Tools%2C+Tutorials+and+Resources+-+O%27Reilly+Media%27%3E%0A%3Cmeta+name%3D%27category%27+content%3D%27%27%3E%0A%3Cmeta+name%3D%27coverage%27+content%3D%27Worldwide%27%3E%0A%3Cmeta+name%3D%27distribution%27+content%3D%27Global%27%3E%0A%3Cmeta+name%3D%27rating%27+content%3D%27General%27%3E%0A%3Cmeta+name%3D%27revisit-after%27+content%3D%277+days%27%3E%0A%3Cmeta+name%3D%27subtitle%27+content%3D%27This+is+my+subtitle%27%3E%0A%3Cmeta+name%3D%27target%27+content%3D%27all%27%3E%0A%3Cmeta+name%3D%27HandheldFriendly%27+content%3D%27True%27%3E%0A%3Cmeta+name%3D%27MobileOptimized%27+content%3D%27320%27%3E%0A%3Cmeta+name%3D%27date%27+content%3D%27Sep.+27%2C+2010%27%3E%0A%3Cmeta+name%3D%27search_date%27+content%3D%272010-09-27%27%3E%0A%3Cmeta+name%3D%27DC.title%27+content%3D%27Unstoppable+Robot+Ninja%27%3E%0A%3Cmeta+name%3D%27ResourceLoaderDynamicStyles%27+content%3D%27%27%3E%0A%3Cmeta+name%3D%27medium%27+content%3D%27blog%27%3E%0A%3Cmeta+name%3D%27syndication-source%27+content%3D%27https%3A%2F%2Fmashable.com%2F2008%2F12%2F24%2Ffree-brand-monitoring-tools%2F%27%3E%0A%3Cmeta+name%3D%27original-source%27+content%3D%27https%3A%2F%2Fmashable.com%2F2008%2F12%2F24%2Ffree-brand-monitoring-tools%2F%27%3E%0A%3Cmeta+name%3D%27verify-v1%27+content%3D%27dV1r%2FZJJdDEI%2B%2BfKJ6iDEl6o%2BTMNtSu0kv18ONeqM0I%3D%27%3E%0A%3Cmeta+name%3D%27y_key%27+content%3D%271e39c508e0d87750%27%3E%0A%3Cmeta+name%3D%27pageKey%27+content%3D%27guest-home%27%3E%0A%3Cmeta+itemprop%3D%27name%27+content%3D%27jQTouch%27%3E%0A%3Cmeta+http-equiv%3D%27Expires%27+content%3D%270%27%3E%0A%3Cmeta+http-equiv%3D%27Pragma%27+content%3D%27no-cache%27%3E%0A%3Cmeta+http-equiv%3D%27Cache-Control%27+content%3D%27no-cache%27%3E%0A%3Cmeta+http-equiv%3D%27imagetoolbar%27+content%3D%27no%27%3E%0A%3Cmeta+http-equiv%3D%27x-dns-prefetch-control%27+content%3D%27off%27%3E'
   49     1        NEW                                              $6      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
   50     4        INIT_FCALL                                               'libxml_use_internal_errors'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                                 
   51     7        INIT_METHOD_CALL                                         !1, 'loadHTML'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
   52    10        NEW                                              $11     'DOMXPath'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $11
   53    14        ASSIGN                                                   !3, <array>
   54    15        INIT_METHOD_CALL                                         !2, 'query'
         16        SEND_VAL_EX                                              '%2F%2Fmeta%5B%28%40name+or+%40http-equiv%29+and+%40content%5D'
         17        DO_FCALL                                      0  $15     
         18      > FE_RESET_R                                       $16     $15, ->38
         19    > > FE_FETCH_R                                               $16, !4, ->38
   56    20    >   INIT_METHOD_CALL                                         !4, 'getAttribute'
         21        INIT_METHOD_CALL                                         !4, 'hasAttribute'
         22        SEND_VAL_EX                                              'name'
         23        DO_FCALL                                      0  $18     
         24      > JMPZ                                                     $18, ->27
         25    >   QM_ASSIGN                                        ~19     'name'
         26      > JMP                                                      ->28
         27    >   QM_ASSIGN                                        ~19     'http-equiv'
         28    >   SEND_VAL_EX                                              ~19
         29        DO_FCALL                                      0  $20     
         30        INIT_ARRAY                                       ~21     $20, 'attr'
   57    31        INIT_METHOD_CALL                                         !4, 'getAttribute'
         32        SEND_VAL_EX                                              'content'
         33        DO_FCALL                                      0  $22     
         34        ADD_ARRAY_ELEMENT                                ~21     $22, 'content'
   55    35        ASSIGN_DIM                                               !3
   57    36        OP_DATA                                                  ~21
   54    37      > JMP                                                      ->19
         38    >   FE_FREE                                                  $16
   60    39        INIT_FCALL                                               'var_export'
         40        SEND_VAR                                                 !3
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
194.21 ms | 1086 KiB | 15 Q