3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strLimit = explode(',',"rpt_Job_Tracking,rpt_Customer_Routing_Report"); $str ="<optgroup label='Billing Summary Reports' style='color:blue;font-weight:bold;'> <option style='color:black; font-weight:normal' value='JobTracking'>Job Tracking</option> <option style='color:black; font-weight:normal' value='CustomerRouting' selected>Customer Routing Report</option> <option style='color:black; font-weight:normal' value='BillingStatistics'>Billing Statistics</option> <option style='color:black; font-weight:normal' value='BranchReport'>Branch Report</option> <option style='color:black; font-weight:normal' value='BranchBilling'>Branch Billing Report</option> <option style='color:black; font-weight:normal' value='BillingActivityDetail'>Billing Activity Details</option> </optgroup> <optgroup label='e-Adoption Reports' style='color:blue;font-weight:bold;'> <option style='color:black; font-weight:normal' value='eAdoptionDashboard'>e-Adoption Dashboard</option> <option style='color:black; font-weight:normal' value='eAdoptionReport'>e-Adoption Chart</option> <option style='color:black; font-weight:normal' value='TopBillingCusts'>Top Paper Customers</option> <option style='color:black; font-weight:normal' value='TopBillingCustsAcctNum'>Top Paper Custs by Acct Num</option> <option style='color:black; font-weight:normal' value='BranchEBillReport'>Branch Electronic Report</option> <option style='color:black; font-weight:normal' value='EasyImportUsage'>EasyImport Usage</option> </optgroup> <optgroup label='eBilling and ePayment' style='color:blue;font-weight:bold;'> <option style='color:black; font-weight:normal' value='OnlinePayments'>Online Payments</option> <option style='color:black; font-weight:normal' value='PaymentFile'>Payment File Report</option> <option style='color:black; font-weight:normal' value='ACHTransfers'>ACH Transfers</option> <option style='color:black; font-weight:normal' value='IGUsage'>Invoice Gateway Usage Report</option> <option style='color:black; font-weight:normal' value='ObpAccountAudit'>Online Account Audit Report</option> <option style='color:black; font-weight:normal' value='EUsageReport'>Invoice Central Usage Report</option> <option style='color:black; font-weight:normal' value='IGUsers'>Online User Report</option> <option style='color:black; font-weight:normal' value='eDSOReport'>eDSO By Month</option> <option style='color:black; font-weight:normal' value='AutoPay'>Auto Pay Report</option> </optgroup> <optgroup label='Bullpen Reports' style='color:blue;font-weight:bold;'> <option style='color:black; font-weight:normal' value='BPInvoices'>Bullpenned Invoices</option> <option style='color:black; font-weight:normal' value='BPStatistics'>Bullpen Statistics</option> </optgroup> <optgroup label='Address Reports' style='color:blue;font-weight:bold;'> <option style='color:black; font-weight:normal' value='UncertifiedAddresses'>Uncertified Addresses</option> <option style='color:black; font-weight:normal' value='NCOAAddressesReport'>NCOA Addresses</option> </optgroup> <optgroup label='Miscellaneous' style='color:blue;font-weight:bold;'> <option style='color:black; font-weight:normal' value='InvoiceExtract'>Invoice Extract</option> <option style='color:black; font-weight:normal' value='FaxFailures'>Fax Failures</option> <option style='color:black; font-weight:normal' value='EmailFailures'>Transmittal Failures</option>"; $rptList = array(); $doc = new DOMDocument(); $doc->loadHTML($str); $headings = $doc->getElementsByTagName('optgroup'); $books = $doc->getElementsByTagName('option'); foreach($headings as $heading) { $parentItem = $heading->getAttribute('label'); if($heading->hasChildNodes()) { $childItems = $heading->getElementsByTagName('option'); foreach ($childItems as $childItem) { $rptList[$parentItem][] = $childItem->nodeValue; } } } print_r($strLimit); print_r($rptList);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 43
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 43
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 42
Branch analysis from position: 30
2 jumps found. (Code = 77) Position 1 = 35, Position 2 = 41
Branch analysis from position: 35
2 jumps found. (Code = 78) Position 1 = 36, Position 2 = 41
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 41
Branch analysis from position: 42
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
filename:       /in/OQ9cY
function name:  (null)
number of ops:  51
compiled vars:  !0 = $strLimit, !1 = $str, !2 = $rptList, !3 = $doc, !4 = $headings, !5 = $books, !6 = $heading, !7 = $parentItem, !8 = $childItems, !9 = $childItem
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '%2C'
          2        SEND_VAL                                                 'rpt_Job_Tracking%2Crpt_Customer_Routing_Report'
          3        DO_ICALL                                         $10     
          4        ASSIGN                                                   !0, $10
    4     5        ASSIGN                                                   !1, '%3Coptgroup+label%3D%27Billing+Summary+Reports%27+style%3D%27color%3Ablue%3Bfont-weight%3Abold%3B%27%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27JobTracking%27%3EJob+Tracking%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27CustomerRouting%27+selected%3ECustomer+Routing+Report%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27BillingStatistics%27%3EBilling+Statistics%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27BranchReport%27%3EBranch+Report%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27BranchBilling%27%3EBranch+Billing+Report%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27BillingActivityDetail%27%3EBilling+Activity+Details%3C%2Foption%3E%0A%3C%2Foptgroup%3E%0A%3Coptgroup+label%3D%27e-Adoption+Reports%27+style%3D%27color%3Ablue%3Bfont-weight%3Abold%3B%27%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27eAdoptionDashboard%27%3Ee-Adoption+Dashboard%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27eAdoptionReport%27%3Ee-Adoption+Chart%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27TopBillingCusts%27%3ETop+Paper+Customers%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27TopBillingCustsAcctNum%27%3ETop+Paper+Custs+by+Acct+Num%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27BranchEBillReport%27%3EBranch+Electronic+Report%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27EasyImportUsage%27%3EEasyImport+Usage%3C%2Foption%3E%0A%3C%2Foptgroup%3E%0A%3Coptgroup+label%3D%27eBilling+and+ePayment%27+style%3D%27color%3Ablue%3Bfont-weight%3Abold%3B%27%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27OnlinePayments%27%3EOnline+Payments%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27PaymentFile%27%3EPayment+File+Report%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27ACHTransfers%27%3EACH+Transfers%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27IGUsage%27%3EInvoice+Gateway+Usage+Report%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27ObpAccountAudit%27%3EOnline+Account+Audit+Report%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27EUsageReport%27%3EInvoice+Central+Usage+Report%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27IGUsers%27%3EOnline+User+Report%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27eDSOReport%27%3EeDSO+By+Month%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27AutoPay%27%3EAuto+Pay+Report%3C%2Foption%3E%0A%3C%2Foptgroup%3E%0A%3Coptgroup+label%3D%27Bullpen+Reports%27+style%3D%27color%3Ablue%3Bfont-weight%3Abold%3B%27%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27BPInvoices%27%3EBullpenned+Invoices%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27BPStatistics%27%3EBullpen+Statistics%3C%2Foption%3E%0A%3C%2Foptgroup%3E%0A%3Coptgroup+label%3D%27Address+Reports%27+style%3D%27color%3Ablue%3Bfont-weight%3Abold%3B%27%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27UncertifiedAddresses%27%3EUncertified+Addresses%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27NCOAAddressesReport%27%3ENCOA+Addresses%3C%2Foption%3E%0A%3C%2Foptgroup%3E%0A%3Coptgroup+label%3D%27Miscellaneous%27+style%3D%27color%3Ablue%3Bfont-weight%3Abold%3B%27%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27InvoiceExtract%27%3EInvoice+Extract%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27FaxFailures%27%3EFax+Failures%3C%2Foption%3E%0A++++%3Coption+style%3D%27color%3Ablack%3B+font-weight%3Anormal%27+value%3D%27EmailFailures%27%3ETransmittal+Failures%3C%2Foption%3E'
   44     6        ASSIGN                                                   !2, <array>
   46     7        NEW                                              $14     'DOMDocument'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !3, $14
   47    10        INIT_METHOD_CALL                                         !3, 'loadHTML'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0          
   48    13        INIT_METHOD_CALL                                         !3, 'getElementsByTagName'
         14        SEND_VAL_EX                                              'optgroup'
         15        DO_FCALL                                      0  $18     
         16        ASSIGN                                                   !4, $18
   49    17        INIT_METHOD_CALL                                         !3, 'getElementsByTagName'
         18        SEND_VAL_EX                                              'option'
         19        DO_FCALL                                      0  $20     
         20        ASSIGN                                                   !5, $20
   50    21      > FE_RESET_R                                       $22     !4, ->43
         22    > > FE_FETCH_R                                               $22, !6, ->43
   51    23    >   INIT_METHOD_CALL                                         !6, 'getAttribute'
         24        SEND_VAL_EX                                              'label'
         25        DO_FCALL                                      0  $23     
         26        ASSIGN                                                   !7, $23
   52    27        INIT_METHOD_CALL                                         !6, 'hasChildNodes'
         28        DO_FCALL                                      0  $25     
         29      > JMPZ                                                     $25, ->42
   53    30    >   INIT_METHOD_CALL                                         !6, 'getElementsByTagName'
         31        SEND_VAL_EX                                              'option'
         32        DO_FCALL                                      0  $26     
         33        ASSIGN                                                   !8, $26
   54    34      > FE_RESET_R                                       $28     !8, ->41
         35    > > FE_FETCH_R                                               $28, !9, ->41
   55    36    >   FETCH_OBJ_R                                      ~31     !9, 'nodeValue'
         37        FETCH_DIM_W                                      $29     !2, !7
         38        ASSIGN_DIM                                               $29
         39        OP_DATA                                                  ~31
   54    40      > JMP                                                      ->35
         41    >   FE_FREE                                                  $28
   50    42    > > JMP                                                      ->22
         43    >   FE_FREE                                                  $22
   59    44        INIT_FCALL                                               'print_r'
         45        SEND_VAR                                                 !0
         46        DO_ICALL                                                 
   60    47        INIT_FCALL                                               'print_r'
         48        SEND_VAR                                                 !2
         49        DO_ICALL                                                 
         50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.04 ms | 1404 KiB | 17 Q