3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <li style="opacity: 1;"> <a class="profile-link" href="CompanyProfile.aspx?PID=4813&amp;country=211&amp;practicearea=0&amp;pagenum=" title="1-844-Iran-Law">Amin Alemohammad</a> <!--<a class="profile-link" href="javascript:void(0)" title="1-844-Iran-Law">Amin Alemohammad</a>--> <img src="/Images/Uploaded/Photos/4813_1844IranLaw.png" style="max-width:140px; max-height:140px"> <div class="results-profile"> <h2>Amin Alemohammad</h2> <p><strong>Firm:</strong> 1-844-Iran-Law <br> <strong>Country:</strong> USA</p> <p class="blue"><strong>Practice Area:</strong> Iranian Desk</p> <ul> <li class="tel-icon" style="opacity: 1;">Tel: +1-202-465-8692</li> <li class="fax-icon" style="opacity: 1;">Fax: +1-202-776-0136</li> <li class="email-icon">Email: <a style="position:relative; z-index:9999;" href="mailto:amin@1844iranlaw.com">amin@1844iranlaw.com</a></li> </ul> </div><!-- results profile --> <img class="practice-logo" src="/Images/Uploaded/Logos/4813_1844IranLaw.png" style="max-width:185px; max-height:70px;"> <a class="results-btn contact-btn" href="CompanyProfile.aspx?PID=4813&amp;country=211&amp;practicearea=0&amp;pagenum=" title="View Full Profile">VIEW FULL PROFILE</a> <!--<a class="results-btn contact-btn" href="CompanyProfile.aspx?PID=4813&country=211&practicearea=0&pagenum=" title="1-844-Iran-Law">CONTACT</a>--> <a class="results-btn website-btn" href="http://www.1844iranlaw.com" title="www.1844iranlaw.com">VIEW WEBSITE</a> </li> HTML; $dom=new DOMDocument; //libxml_use_internal_errors(true); // for <li> warning suppress $dom->loadHTML($html); //libxml_clear_errors(); // for <li> warning suppress $xpath = new DOMXPath($dom); foreach ($xpath->evaluate("//a[@class='profile-link']") as $node) { parse_str(parse_url($node->getAttribute('href'), PHP_URL_QUERY), $output); $output['title'] = $node->getAttribute('title'); $output['text'] = $node->nodeValue; } var_export($output);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 36
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 36
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/kfEl1
function name:  (null)
number of ops:  41
compiled vars:  !0 = $html, !1 = $dom, !2 = $xpath, !3 = $node, !4 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cli+style%3D%22opacity%3A+1%3B%22%3E%0A++++%3Ca+class%3D%22profile-link%22+href%3D%22CompanyProfile.aspx%3FPID%3D4813%26amp%3Bcountry%3D211%26amp%3Bpracticearea%3D0%26amp%3Bpagenum%3D%22+title%3D%221-844-Iran-Law%22%3EAmin+Alemohammad%3C%2Fa%3E%0A++++%3C%21--%3Ca+class%3D%22profile-link%22+href%3D%22javascript%3Avoid%280%29%22+title%3D%221-844-Iran-Law%22%3EAmin+Alemohammad%3C%2Fa%3E--%3E%0A++++%3Cimg+src%3D%22%2FImages%2FUploaded%2FPhotos%2F4813_1844IranLaw.png%22+style%3D%22max-width%3A140px%3B+max-height%3A140px%22%3E%0A++++%3Cdiv+class%3D%22results-profile%22%3E%0A++++++++%3Ch2%3EAmin+Alemohammad%3C%2Fh2%3E%0A++++++++%3Cp%3E%3Cstrong%3EFirm%3A%3C%2Fstrong%3E+1-844-Iran-Law+%3Cbr%3E+%3Cstrong%3ECountry%3A%3C%2Fstrong%3E+USA%3C%2Fp%3E%0A++++++++%3Cp+class%3D%22blue%22%3E%3Cstrong%3EPractice+Area%3A%3C%2Fstrong%3E+Iranian+Desk%3C%2Fp%3E%0A++++++++%3Cul%3E%0A++++++++++++%3Cli+class%3D%22tel-icon%22+style%3D%22opacity%3A+1%3B%22%3ETel%3A+%2B1-202-465-8692%3C%2Fli%3E%0A++++++++++++%3Cli+class%3D%22fax-icon%22+style%3D%22opacity%3A+1%3B%22%3EFax%3A+%2B1-202-776-0136%3C%2Fli%3E%0A++++++++++++%3Cli+class%3D%22email-icon%22%3EEmail%3A+%3Ca+style%3D%22position%3Arelative%3B+z-index%3A9999%3B%22+href%3D%22mailto%3Aamin%401844iranlaw.com%22%3Eamin%401844iranlaw.com%3C%2Fa%3E%3C%2Fli%3E%0A++++++++%3C%2Ful%3E%0A++++%3C%2Fdiv%3E%3C%21--+results+profile+--%3E%0A++++%3Cimg+class%3D%22practice-logo%22+src%3D%22%2FImages%2FUploaded%2FLogos%2F4813_1844IranLaw.png%22+style%3D%22max-width%3A185px%3B+max-height%3A70px%3B%22%3E%0A++++%3Ca+class%3D%22results-btn+contact-btn%22+href%3D%22CompanyProfile.aspx%3FPID%3D4813%26amp%3Bcountry%3D211%26amp%3Bpracticearea%3D0%26amp%3Bpagenum%3D%22+title%3D%22View+Full+Profile%22%3EVIEW+FULL+PROFILE%3C%2Fa%3E%0A++++%3C%21--%3Ca+class%3D%22results-btn+contact-btn%22+href%3D%22CompanyProfile.aspx%3FPID%3D4813%26country%3D211%26practicearea%3D0%26pagenum%3D%22+title%3D%221-844-Iran-Law%22%3ECONTACT%3C%2Fa%3E--%3E%0A++++%3Ca+class%3D%22results-btn+website-btn%22+href%3D%22http%3A%2F%2Fwww.1844iranlaw.com%22+title%3D%22www.1844iranlaw.com%22%3EVIEW+WEBSITE%3C%2Fa%3E%0A%3C%2Fli%3E'
   24     1        NEW                                              $6      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
   26     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   28     7        NEW                                              $10     'DOMXPath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $10
   29    11        INIT_METHOD_CALL                                         !2, 'evaluate'
         12        SEND_VAL_EX                                              '%2F%2Fa%5B%40class%3D%27profile-link%27%5D'
         13        DO_FCALL                                      0  $13     
         14      > FE_RESET_R                                       $14     $13, ->36
         15    > > FE_FETCH_R                                               $14, !3, ->36
   30    16    >   INIT_FCALL                                               'parse_str'
         17        INIT_FCALL                                               'parse_url'
         18        INIT_METHOD_CALL                                         !3, 'getAttribute'
         19        SEND_VAL_EX                                              'href'
         20        DO_FCALL                                      0  $15     
         21        SEND_VAR                                                 $15
         22        SEND_VAL                                                 6
         23        DO_ICALL                                         $16     
         24        SEND_VAR                                                 $16
         25        SEND_REF                                                 !4
         26        DO_ICALL                                                 
   31    27        INIT_METHOD_CALL                                         !3, 'getAttribute'
         28        SEND_VAL_EX                                              'title'
         29        DO_FCALL                                      0  $19     
         30        ASSIGN_DIM                                               !4, 'title'
         31        OP_DATA                                                  $19
   32    32        FETCH_OBJ_R                                      ~21     !3, 'nodeValue'
         33        ASSIGN_DIM                                               !4, 'text'
         34        OP_DATA                                                  ~21
   29    35      > JMP                                                      ->15
         36    >   FE_FREE                                                  $14
   34    37        INIT_FCALL                                               'var_export'
         38        SEND_VAR                                                 !4
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.08 ms | 1405 KiB | 19 Q