3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<JSON [{"eventID":152913573,"template":"Brisbane City Council","title":"Clock Tower Tour","description":"The Clock Tour Tower is a &#8216;must-do&#8217; for anyone and everyone in Brisbane!<br /> <br /> For many years, City Hall&#8217;s Clock Tower made the building the tallest in Brisbane, offering visitors a magnificent 360 degree view of the city around them. Whilst the view has changed significantly over the last 90 years, the time-honoured tradition of &#8220;taking a trip up the tower&#8221; happily continues at Museum of Brisbane.<br /> <br /> The Clock Tower Tour includes a ride in one of Brisbane&#8217;s oldest working cage lifts, a look behind Australia&#8217;s largest analogue clock faces and time to explore the observation platform that shares a unique perspective of the city. See if you can catch a glimpse of the bells!<br /> <br /> <strong>Location</strong>: Tour begins from Museum of Brisbane reception on Level 3 of City Hall.","location":"Museum of Brisbane, Brisbane City","webLink":"","startDateTime":"2021-06-13T00:00:00","endDateTime":"2021-06-14T00:00:00","dateTimeFormatted":"Sunday, June 13, 2021","allDay":true,"startTimeZoneOffset":"+1000","endTimeZoneOffset":"+1000","canceled":false,"openSignUp":false,"reservationFull":false,"pastDeadline":false,"requiresPayment":false,"refundsAllowed":false,"waitingListAvailable":false,"signUpUrl":"https://eventactions.com/eareg.aspx?ea=Rsvp&invite=0tva7etjn38te1bve2yj59425pupt7wvscmr1z6depcj9ctnrh7r","repeatingRegistration":0,"repeats":"Every Sunday, Tuesday, Wednesday, Thursday, Friday and Saturday through June 30, 2021","seriesID":152913560,"eventImage":{"url":"https://www.trumba.com/i/DgDhxtvzZEBEz%2AjAEUDofPUE.jpeg","size":{"width":1290,"height":775}},"detailImage":{"url":"https://www.trumba.com/i/DgDhxtvzZEBEz%2AjAEUDofPUE.jpeg","size":{"width":1290,"height":775}},"customFields":[{"fieldID":22503,"label":"Venue","value":"Museum of Brisbane, Brisbane City","type":17},{"fieldID":22505,"label":"Venue address","value":"<a href=\"http://maps.google.com/?q=-27.4693454,153.0216909(Museum+of+Brisbane%2c+Brisbane+City)\" target=\"_blank\" rel=\"noopener\">Museum of Brisbane, Brisbane City Hall, 64 Adelaide Street, Brisbane City</a>","type":9},{"fieldID":21859,"label":"Event type","value":"Family events, Free","type":17},{"fieldID":22177,"label":"Cost","value":"Free","type":0},{"fieldID":23562,"label":"Age","value":"Suitable for all ages","type":0},{"fieldID":22732,"label":"Bookings","value":"Book via the <a href=\"https://www.museumofbrisbane.com.au/whats-on/clock-tower-tour/\" target=\"_blank\" rel=\"noopener\">Museum of Brisbane website</a>.","type":1},{"fieldID":51540,"label":"Bookings required","value":"Yes","type":3}],"permaLinkUrl":"https://www.brisbane.qld.gov.au/trumba?trumbaEmbed=view%3devent%26eventid%3d152913573","eventActionUrl":"https://eventactions.com/eventactions/brisbane-city-council#/actions/cvuzsak1g2d45mndcjwkp24nfw","categoryCalendar":"Brisbane's calendar|Museum of Brisbane","registrationTransferTargetCount":0,"regAllowChanges":true}] JSON; $decode = json_decode($json); foreach ($decode as $event) { foreach ($event->customFields as $field) { if ($field->type == 9) { echo $field->value."\n"; if (preg_match('/href="(.*?)"/', $field->value, $matches)){ preg_match('/q=([\-\.0-9]*),([\-\.0-9]*)/',$matches[1], $latlong); array_shift($latlong); var_dump($latlong); } break; } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 39
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 39
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 37
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 37
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 36
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 35
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 35
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 37
Branch analysis from position: 37
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
filename:       /in/AkRvI
function name:  (null)
number of ops:  41
compiled vars:  !0 = $json, !1 = $decode, !2 = $event, !3 = $field, !4 = $matches, !5 = $latlong
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B%7B%22eventID%22%3A152913573%2C%22template%22%3A%22Brisbane+City+Council%22%2C%22title%22%3A%22Clock+Tower+Tour%22%2C%22description%22%3A%22The+Clock+Tour+Tower+is+a+%26%238216%3Bmust-do%26%238217%3B+for+anyone+and+everyone+in+Brisbane%21%3Cbr+%2F%3E+%3Cbr+%2F%3E+For+many+years%2C+City+Hall%26%238217%3Bs+Clock+Tower+made+the+building+the+tallest+in+Brisbane%2C+offering+visitors+a+magnificent+360+degree+view+of+the+city+around+them.+Whilst+the+view+has+changed+significantly+over+the+last+90+years%2C+the+time-honoured+tradition+of+%26%238220%3Btaking+a+trip+up+the+tower%26%238221%3B+happily+continues+at+Museum+of+Brisbane.%3Cbr+%2F%3E+%3Cbr+%2F%3E+The+Clock+Tower+Tour+includes+a+ride+in+one+of+Brisbane%26%238217%3Bs+oldest+working+cage+lifts%2C+a+look+behind+Australia%26%238217%3Bs+largest+analogue+clock+faces+and+time+to+explore+the+observation+platform+that+shares+a+unique+perspective+of+the+city.+See+if+you+can+catch+a+glimpse+of+the+bells%21%3Cbr+%2F%3E+%3Cbr+%2F%3E+%3Cstrong%3ELocation%3C%2Fstrong%3E%3A+Tour+begins+from+Museum+of+Brisbane+reception+on+Level+3+of+City+Hall.%22%2C%22location%22%3A%22Museum+of+Brisbane%2C+Brisbane+City%22%2C%22webLink%22%3A%22%22%2C%22startDateTime%22%3A%222021-06-13T00%3A00%3A00%22%2C%22endDateTime%22%3A%222021-06-14T00%3A00%3A00%22%2C%22dateTimeFormatted%22%3A%22Sunday%2C+June+13%2C+2021%22%2C%22allDay%22%3Atrue%2C%22startTimeZoneOffset%22%3A%22%2B1000%22%2C%22endTimeZoneOffset%22%3A%22%2B1000%22%2C%22canceled%22%3Afalse%2C%22openSignUp%22%3Afalse%2C%22reservationFull%22%3Afalse%2C%22pastDeadline%22%3Afalse%2C%22requiresPayment%22%3Afalse%2C%22refundsAllowed%22%3Afalse%2C%22waitingListAvailable%22%3Afalse%2C%22signUpUrl%22%3A%22https%3A%2F%2Feventactions.com%2Feareg.aspx%3Fea%3DRsvp%26invite%3D0tva7etjn38te1bve2yj59425pupt7wvscmr1z6depcj9ctnrh7r%22%2C%22repeatingRegistration%22%3A0%2C%22repeats%22%3A%22Every+Sunday%2C+Tuesday%2C+Wednesday%2C+Thursday%2C+Friday+and+Saturday+through+June+30%2C+2021%22%2C%22seriesID%22%3A152913560%2C%22eventImage%22%3A%7B%22url%22%3A%22https%3A%2F%2Fwww.trumba.com%2Fi%2FDgDhxtvzZEBEz%252AjAEUDofPUE.jpeg%22%2C%22size%22%3A%7B%22width%22%3A1290%2C%22height%22%3A775%7D%7D%2C%22detailImage%22%3A%7B%22url%22%3A%22https%3A%2F%2Fwww.trumba.com%2Fi%2FDgDhxtvzZEBEz%252AjAEUDofPUE.jpeg%22%2C%22size%22%3A%7B%22width%22%3A1290%2C%22height%22%3A775%7D%7D%2C%22customFields%22%3A%5B%7B%22fieldID%22%3A22503%2C%22label%22%3A%22Venue%22%2C%22value%22%3A%22Museum+of+Brisbane%2C+Brisbane+City%22%2C%22type%22%3A17%7D%2C%7B%22fieldID%22%3A22505%2C%22label%22%3A%22Venue+address%22%2C%22value%22%3A%22%3Ca+href%3D%5C%22http%3A%2F%2Fmaps.google.com%2F%3Fq%3D-27.4693454%2C153.0216909%28Museum%2Bof%2BBrisbane%252c%2BBrisbane%2BCity%29%5C%22+target%3D%5C%22_blank%5C%22+rel%3D%5C%22noopener%5C%22%3EMuseum+of+Brisbane%2C+Brisbane+City+Hall%2C+64+Adelaide+Street%2C+Brisbane+City%3C%2Fa%3E%22%2C%22type%22%3A9%7D%2C%7B%22fieldID%22%3A21859%2C%22label%22%3A%22Event+type%22%2C%22value%22%3A%22Family+events%2C+Free%22%2C%22type%22%3A17%7D%2C%7B%22fieldID%22%3A22177%2C%22label%22%3A%22Cost%22%2C%22value%22%3A%22Free%22%2C%22type%22%3A0%7D%2C%7B%22fieldID%22%3A23562%2C%22label%22%3A%22Age%22%2C%22value%22%3A%22Suitable+for+all+ages%22%2C%22type%22%3A0%7D%2C%7B%22fieldID%22%3A22732%2C%22label%22%3A%22Bookings%22%2C%22value%22%3A%22Book+via+the+%3Ca+href%3D%5C%22https%3A%2F%2Fwww.museumofbrisbane.com.au%2Fwhats-on%2Fclock-tower-tour%2F%5C%22+target%3D%5C%22_blank%5C%22+rel%3D%5C%22noopener%5C%22%3EMuseum+of+Brisbane+website%3C%2Fa%3E.%22%2C%22type%22%3A1%7D%2C%7B%22fieldID%22%3A51540%2C%22label%22%3A%22Bookings+required%22%2C%22value%22%3A%22Yes%22%2C%22type%22%3A3%7D%5D%2C%22permaLinkUrl%22%3A%22https%3A%2F%2Fwww.brisbane.qld.gov.au%2Ftrumba%3FtrumbaEmbed%3Dview%253devent%2526eventid%253d152913573%22%2C%22eventActionUrl%22%3A%22https%3A%2F%2Feventactions.com%2Feventactions%2Fbrisbane-city-council%23%2Factions%2Fcvuzsak1g2d45mndcjwkp24nfw%22%2C%22categoryCalendar%22%3A%22Brisbane%27s+calendar%7CMuseum+of+Brisbane%22%2C%22registrationTransferTargetCount%22%3A0%2C%22regAllowChanges%22%3Atrue%7D%5D'
    6     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
    8     5      > FE_RESET_R                                       $9      !1, ->39
          6    > > FE_FETCH_R                                               $9, !2, ->39
    9     7    >   FETCH_OBJ_R                                      ~10     !2, 'customFields'
          8      > FE_RESET_R                                       $11     ~10, ->37
          9    > > FE_FETCH_R                                               $11, !3, ->37
   10    10    >   FETCH_OBJ_R                                      ~12     !3, 'type'
         11        IS_EQUAL                                                 ~12, 9
         12      > JMPZ                                                     ~13, ->36
   11    13    >   FETCH_OBJ_R                                      ~14     !3, 'value'
         14        CONCAT                                           ~15     ~14, '%0A'
         15        ECHO                                                     ~15
   12    16        INIT_FCALL                                               'preg_match'
         17        SEND_VAL                                                 '%2Fhref%3D%22%28.%2A%3F%29%22%2F'
         18        FETCH_OBJ_R                                      ~16     !3, 'value'
         19        SEND_VAL                                                 ~16
         20        SEND_REF                                                 !4
         21        DO_ICALL                                         $17     
         22      > JMPZ                                                     $17, ->35
   13    23    >   INIT_FCALL                                               'preg_match'
         24        SEND_VAL                                                 '%2Fq%3D%28%5B%5C-%5C.0-9%5D%2A%29%2C%28%5B%5C-%5C.0-9%5D%2A%29%2F'
         25        FETCH_DIM_R                                      ~18     !4, 1
         26        SEND_VAL                                                 ~18
         27        SEND_REF                                                 !5
         28        DO_ICALL                                                 
   14    29        INIT_FCALL                                               'array_shift'
         30        SEND_REF                                                 !5
         31        DO_ICALL                                                 
   15    32        INIT_FCALL                                               'var_dump'
         33        SEND_VAR                                                 !5
         34        DO_ICALL                                                 
   18    35    > > JMP                                                      ->37
    9    36    > > JMP                                                      ->9
         37    >   FE_FREE                                                  $11
    8    38      > JMP                                                      ->6
         39    >   FE_FREE                                                  $9
   22    40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.83 ms | 1010 KiB | 17 Q