3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = <<<XML <MembershipCardInfo><CardNo>8898990000000083</CardNo><MemberID>1144582</MemberID><PrintedName /><MembershipTypeCode>MSR</MembershipTypeCode><MembershipStatusCode>ACTIVE</MembershipStatusCode><MembershipPhoto>8898990000000083.jpg</MembershipPhoto><IssueDate>2014-09-15T00:00:00</IssueDate><EffectiveDate>2014-09-15T00:00:00</EffectiveDate><ExpiryDate>2015-09-15T00:00:00</ExpiryDate><Printed>false</Printed><PrintedDate xsi:nil="true" /><RenewedDate xsi:nil="true" /><tmpEffectiveDate xsi:nil="true" /><tmpExpiryDate xsi:nil="true" /><tmpMembershipStatusCode /><PointsBAL>0.0000</PointsBAL><Remarks /><MembershipDiscount>0</MembershipDiscount><TierCode>Welcome</TierCode><TotalSpending>0</TotalSpending><TotalNettSpending>0</TotalNettSpending><TotalPoints>0</TotalPoints><TotalVisits>0</TotalVisits><LastVisitedOutletCode /><MostCycleVisitedOutletCode>394</MostCycleVisitedOutletCode><TotalCycleVisits>0</TotalCycleVisits><TotalCycleSpending>0</TotalCycleSpending><TotalCycleNettSpending>0</TotalCycleNettSpending><TotalCyclePoints>0</TotalCyclePoints><TotalBalPoints>0</TotalBalPoints><CurrentMonthSpending>0</CurrentMonthSpending><CurrentMonth_1Spending>0</CurrentMonth_1Spending><CurrentMonth_2Spending>0</CurrentMonth_2Spending><CurrentMonthNettSpending>0</CurrentMonthNettSpending><CurrentMonth_1NettSpending>0</CurrentMonth_1NettSpending><CurrentMonth_2NettSpending>0</CurrentMonth_2NettSpending></MembershipCardInfo><MembershipCardInfo><CardNo>8898000000000260</CardNo><MemberID>1144582</MemberID><PrintedName>Test</PrintedName><MembershipTypeCode>MSR</MembershipTypeCode><MembershipStatusCode>ACTIVE</MembershipStatusCode><MembershipPhoto>Featured.jpg</MembershipPhoto><IssueDate>2014-09-19T00:00:00</IssueDate><EffectiveDate>2014-09-19T00:00:00</EffectiveDate><ExpiryDate>2017-09-20T00:00:00</ExpiryDate><Printed>false</Printed><PrintedDate xsi:nil="true" /><RenewedDate xsi:nil="true" /><tmpEffectiveDate xsi:nil="true" /><tmpExpiryDate xsi:nil="true" /><tmpMembershipStatusCode /><PointsBAL>0.0000</PointsBAL><Remarks /><MembershipDiscount>0</MembershipDiscount><TierCode>Unassigned</TierCode><TotalSpending>18.2</TotalSpending><TotalNettSpending>18</TotalNettSpending><TotalPoints>0</TotalPoints><TotalVisits>1</TotalVisits><LastVisitedOutletCode>394</LastVisitedOutletCode><MostCycleVisitedOutletCode /><TotalCycleVisits>1</TotalCycleVisits><TotalCycleSpending>18.2</TotalCycleSpending><TotalCycleNettSpending>18</TotalCycleNettSpending><TotalCyclePoints>0</TotalCyclePoints><TotalBalPoints>0</TotalBalPoints><CurrentMonthSpending>18.2</CurrentMonthSpending><CurrentMonth_1Spending>0</CurrentMonth_1Spending><CurrentMonth_2Spending>0</CurrentMonth_2Spending><CurrentMonthNettSpending>0</CurrentMonthNettSpending><CurrentMonth_1NettSpending>0</CurrentMonth_1NettSpending><CurrentMonth_2NettSpending>0</CurrentMonth_2NettSpending></MembershipCardInfo> XML; $xml = simplexml_load_string($x); $i = 0; foreach ($xml->MembershipCardInfo as $card): $cardArray[$i] = $card->CardNo; $i++; endforeach; foreach ($cardArray as $item) { echo $item.'<br />'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 14
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 14
filename:       /in/5uf2h
function name:  (null)
number of ops:  22
compiled vars:  !0 = $x, !1 = $xml, !2 = $i, !3 = $card, !4 = $cardArray, !5 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3CMembershipCardInfo%3E%3CCardNo%3E8898990000000083%3C%2FCardNo%3E%3CMemberID%3E1144582%3C%2FMemberID%3E%3CPrintedName+%2F%3E%3CMembershipTypeCode%3EMSR%3C%2FMembershipTypeCode%3E%3CMembershipStatusCode%3EACTIVE%3C%2FMembershipStatusCode%3E%3CMembershipPhoto%3E8898990000000083.jpg%3C%2FMembershipPhoto%3E%3CIssueDate%3E2014-09-15T00%3A00%3A00%3C%2FIssueDate%3E%3CEffectiveDate%3E2014-09-15T00%3A00%3A00%3C%2FEffectiveDate%3E%3CExpiryDate%3E2015-09-15T00%3A00%3A00%3C%2FExpiryDate%3E%3CPrinted%3Efalse%3C%2FPrinted%3E%3CPrintedDate+xsi%3Anil%3D%22true%22+%2F%3E%3CRenewedDate+xsi%3Anil%3D%22true%22+%2F%3E%3CtmpEffectiveDate+xsi%3Anil%3D%22true%22+%2F%3E%3CtmpExpiryDate+xsi%3Anil%3D%22true%22+%2F%3E%3CtmpMembershipStatusCode+%2F%3E%3CPointsBAL%3E0.0000%3C%2FPointsBAL%3E%3CRemarks+%2F%3E%3CMembershipDiscount%3E0%3C%2FMembershipDiscount%3E%3CTierCode%3EWelcome%3C%2FTierCode%3E%3CTotalSpending%3E0%3C%2FTotalSpending%3E%3CTotalNettSpending%3E0%3C%2FTotalNettSpending%3E%3CTotalPoints%3E0%3C%2FTotalPoints%3E%3CTotalVisits%3E0%3C%2FTotalVisits%3E%3CLastVisitedOutletCode+%2F%3E%3CMostCycleVisitedOutletCode%3E394%3C%2FMostCycleVisitedOutletCode%3E%3CTotalCycleVisits%3E0%3C%2FTotalCycleVisits%3E%3CTotalCycleSpending%3E0%3C%2FTotalCycleSpending%3E%3CTotalCycleNettSpending%3E0%3C%2FTotalCycleNettSpending%3E%3CTotalCyclePoints%3E0%3C%2FTotalCyclePoints%3E%3CTotalBalPoints%3E0%3C%2FTotalBalPoints%3E%3CCurrentMonthSpending%3E0%3C%2FCurrentMonthSpending%3E%3CCurrentMonth_1Spending%3E0%3C%2FCurrentMonth_1Spending%3E%3CCurrentMonth_2Spending%3E0%3C%2FCurrentMonth_2Spending%3E%3CCurrentMonthNettSpending%3E0%3C%2FCurrentMonthNettSpending%3E%3CCurrentMonth_1NettSpending%3E0%3C%2FCurrentMonth_1NettSpending%3E%3CCurrentMonth_2NettSpending%3E0%3C%2FCurrentMonth_2NettSpending%3E%3C%2FMembershipCardInfo%3E%3CMembershipCardInfo%3E%3CCardNo%3E8898000000000260%3C%2FCardNo%3E%3CMemberID%3E1144582%3C%2FMemberID%3E%3CPrintedName%3ETest%3C%2FPrintedName%3E%3CMembershipTypeCode%3EMSR%3C%2FMembershipTypeCode%3E%3CMembershipStatusCode%3EACTIVE%3C%2FMembershipStatusCode%3E%3CMembershipPhoto%3EFeatured.jpg%3C%2FMembershipPhoto%3E%3CIssueDate%3E2014-09-19T00%3A00%3A00%3C%2FIssueDate%3E%3CEffectiveDate%3E2014-09-19T00%3A00%3A00%3C%2FEffectiveDate%3E%3CExpiryDate%3E2017-09-20T00%3A00%3A00%3C%2FExpiryDate%3E%3CPrinted%3Efalse%3C%2FPrinted%3E%3CPrintedDate+xsi%3Anil%3D%22true%22+%2F%3E%3CRenewedDate+xsi%3Anil%3D%22true%22+%2F%3E%3CtmpEffectiveDate+xsi%3Anil%3D%22true%22+%2F%3E%3CtmpExpiryDate+xsi%3Anil%3D%22true%22+%2F%3E%3CtmpMembershipStatusCode+%2F%3E%3CPointsBAL%3E0.0000%3C%2FPointsBAL%3E%3CRemarks+%2F%3E%3CMembershipDiscount%3E0%3C%2FMembershipDiscount%3E%3CTierCode%3EUnassigned%3C%2FTierCode%3E%3CTotalSpending%3E18.2%3C%2FTotalSpending%3E%3CTotalNettSpending%3E18%3C%2FTotalNettSpending%3E%3CTotalPoints%3E0%3C%2FTotalPoints%3E%3CTotalVisits%3E1%3C%2FTotalVisits%3E%3CLastVisitedOutletCode%3E394%3C%2FLastVisitedOutletCode%3E%3CMostCycleVisitedOutletCode+%2F%3E%3CTotalCycleVisits%3E1%3C%2FTotalCycleVisits%3E%3CTotalCycleSpending%3E18.2%3C%2FTotalCycleSpending%3E%3CTotalCycleNettSpending%3E18%3C%2FTotalCycleNettSpending%3E%3CTotalCyclePoints%3E0%3C%2FTotalCyclePoints%3E%3CTotalBalPoints%3E0%3C%2FTotalBalPoints%3E%3CCurrentMonthSpending%3E18.2%3C%2FCurrentMonthSpending%3E%3CCurrentMonth_1Spending%3E0%3C%2FCurrentMonth_1Spending%3E%3CCurrentMonth_2Spending%3E0%3C%2FCurrentMonth_2Spending%3E%3CCurrentMonthNettSpending%3E0%3C%2FCurrentMonthNettSpending%3E%3CCurrentMonth_1NettSpending%3E0%3C%2FCurrentMonth_1NettSpending%3E%3CCurrentMonth_2NettSpending%3E0%3C%2FCurrentMonth_2NettSpending%3E%3C%2FMembershipCardInfo%3E'
    6     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
    8     5        ASSIGN                                                   !2, 0
    9     6        FETCH_OBJ_R                                      ~10     !1, 'MembershipCardInfo'
          7      > FE_RESET_R                                       $11     ~10, ->14
          8    > > FE_FETCH_R                                               $11, !3, ->14
   10     9    >   FETCH_OBJ_R                                      ~13     !3, 'CardNo'
         10        ASSIGN_DIM                                               !4, !2
         11        OP_DATA                                                  ~13
   11    12        PRE_INC                                                  !2
    9    13      > JMP                                                      ->8
         14    >   FE_FREE                                                  $11
   14    15      > FE_RESET_R                                       $15     !4, ->20
         16    > > FE_FETCH_R                                               $15, !5, ->20
   15    17    >   CONCAT                                           ~16     !5, '%3Cbr+%2F%3E'
         18        ECHO                                                     ~16
   14    19      > JMP                                                      ->16
         20    >   FE_FREE                                                  $15
   16    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.97 ms | 1392 KiB | 15 Q