3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<'EOD' <body class="default-theme des-mat" style="background: rgb(255, 255, 255);"><div id="prpd"></div><div class="" id="mngb"><div id="gb" class="gb_T"><div class="gb_nb gb_Lg gb_R gb_Kg gb_Og gb_T" style="min-width: 241px;"><div class="gb_oe gb_R gb_Lg gb_Bg"><div class="gb_Q gb_R gb_S gb_Lg"><span class="_c1 ei_card_subtitle _c1">Name<br /> 713286XXX971 - 12021980</span>/div><div class="gb_Q gb_R"><a class="gb_P" data-pid="23" href="https://mail.google.com/mail/?authuser=0">Gmail</a></div><div class="gb_Q gb_R"><a class="gb_P" data-pid="2" href="https://www.google.com/imghp?hl=en&amp;authuser=0">Images</a></div></div><div class="gb_Ec gb_Lg gb_R" style="min-width: 120px;"><div class="gb_fa" id="gbsfw" style="background-color:#eee;min-width:376px"><iframe ng-non-bindable="" frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" style="width: 376px; height: 380px;" tabindex="0" vspace="0" width="100%" class="gb_9b" allowtransparency="true" aria-hidden="true" id="I0_1523641321551" name="I0_1523641321551" src="https://notifications.google.com/u/0/widget?sourceid=243&amp;hl=en&amp;origin=https%3A%2F%2Fwww.google.com&amp;uc=1&amp;usegapi=1&amp;jsh=m%3B%2F_%2Fscs%2Fabc-static%2F_%2Fjs%2Fk%3Dgapi.gapi.en.DgOlXVbWcXc.O%2Fm%3D__features__%2Frt%3Dj%2Fd%3D1%2Frs%3DAHpOoo-riybzrJ8O_UpInxWO1d1OWu1FtA#pid=243&amp;_methods=onError%2ConInfo%2ChideNotificationWidget%2CpostSharedMessage%2Creauth%2CsetNotificationWidgetHeight%2CsetNotificationWidgetSize%2CswitchTo%2CnavigateTo%2CsetNotificationText%2CsetNotificationAnimation%2CgetNotificationText%2CvalidateUser%2C_ready&amp;id=I0_1523641321551&amp;_gfid=I0_1523641321551&amp;parent=https%3A%2F%2Fwww.google.com&amp;pfname=&amp;rpctoken=13573360"></iframe></div><div class="gb_da gb_9c gb_R" id="gbwa"><div class="gb_Qc"><a class="gb_b gb_hc" href="https://www.google.com/intl/en/options/" title="Google apps" aria-expanded="false" role="button" tabindex="0"></a><div class="gb_wb"></div></body> EOD; $dom = new DOMDocument; $state = libxml_use_internal_errors(true); $dom->loadHTML($html); libxml_use_internal_errors($state); $xp = new DOMXPath($dom); $nodeList = $xp->query('normalize-space(//span[contains(@class, "_c1") and contains(@class, "ei_card_subtitle")]/br/following-sibling::text())'); foreach ($nodeList as $node) { echo sscanf($node->nodeValue, '%[0-9X]')[0], PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 33
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 33
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/79l1n
function name:  (null)
number of ops:  35
compiled vars:  !0 = $html, !1 = $dom, !2 = $state, !3 = $xp, !4 = $nodeList, !5 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cbody+class%3D%22default-theme+des-mat%22+style%3D%22background%3A+rgb%28255%2C+255%2C+255%29%3B%22%3E%3Cdiv+id%3D%22prpd%22%3E%3C%2Fdiv%3E%3Cdiv+class%3D%22%22+id%3D%22mngb%22%3E%3Cdiv+id%3D%22gb%22+class%3D%22gb_T%22%3E%3Cdiv+class%3D%22gb_nb+gb_Lg+gb_R+gb_Kg+gb_Og+gb_T%22+style%3D%22min-width%3A+241px%3B%22%3E%3Cdiv+class%3D%22gb_oe+gb_R+gb_Lg+gb_Bg%22%3E%3Cdiv+class%3D%22gb_Q+gb_R+gb_S+gb_Lg%22%3E%3Cspan+class%3D%22_c1+ei_card_subtitle+_c1%22%3EName%3Cbr+%2F%3E+713286XXX971+-+12021980%3C%2Fspan%3E%2Fdiv%3E%3Cdiv+class%3D%22gb_Q+gb_R%22%3E%3Ca+class%3D%22gb_P%22+data-pid%3D%2223%22+href%3D%22https%3A%2F%2Fmail.google.com%2Fmail%2F%3Fauthuser%3D0%22%3EGmail%3C%2Fa%3E%3C%2Fdiv%3E%3Cdiv+class%3D%22gb_Q+gb_R%22%3E%3Ca+class%3D%22gb_P%22+data-pid%3D%222%22+href%3D%22https%3A%2F%2Fwww.google.com%2Fimghp%3Fhl%3Den%26amp%3Bauthuser%3D0%22%3EImages%3C%2Fa%3E%3C%2Fdiv%3E%3C%2Fdiv%3E%3Cdiv+class%3D%22gb_Ec+gb_Lg+gb_R%22+style%3D%22min-width%3A+120px%3B%22%3E%3Cdiv+class%3D%22gb_fa%22+id%3D%22gbsfw%22+style%3D%22background-color%3A%23eee%3Bmin-width%3A376px%22%3E%3Ciframe+ng-non-bindable%3D%22%22+frameborder%3D%220%22+hspace%3D%220%22+marginheight%3D%220%22+marginwidth%3D%220%22+scrolling%3D%22no%22+style%3D%22width%3A+376px%3B+height%3A+380px%3B%22+tabindex%3D%220%22+vspace%3D%220%22+width%3D%22100%25%22+class%3D%22gb_9b%22+allowtransparency%3D%22true%22+aria-hidden%3D%22true%22+id%3D%22I0_1523641321551%22+name%3D%22I0_1523641321551%22+src%3D%22https%3A%2F%2Fnotifications.google.com%2Fu%2F0%2Fwidget%3Fsourceid%3D243%26amp%3Bhl%3Den%26amp%3Borigin%3Dhttps%253A%252F%252Fwww.google.com%26amp%3Buc%3D1%26amp%3Busegapi%3D1%26amp%3Bjsh%3Dm%253B%252F_%252Fscs%252Fabc-static%252F_%252Fjs%252Fk%253Dgapi.gapi.en.DgOlXVbWcXc.O%252Fm%253D__features__%252Frt%253Dj%252Fd%253D1%252Frs%253DAHpOoo-riybzrJ8O_UpInxWO1d1OWu1FtA%23pid%3D243%26amp%3B_methods%3DonError%252ConInfo%252ChideNotificationWidget%252CpostSharedMessage%252Creauth%252CsetNotificationWidgetHeight%252CsetNotificationWidgetSize%252CswitchTo%252CnavigateTo%252CsetNotificationText%252CsetNotificationAnimation%252CgetNotificationText%252CvalidateUser%252C_ready%26amp%3Bid%3DI0_1523641321551%26amp%3B_gfid%3DI0_1523641321551%26amp%3Bparent%3Dhttps%253A%252F%252Fwww.google.com%26amp%3Bpfname%3D%26amp%3Brpctoken%3D13573360%22%3E%3C%2Fiframe%3E%3C%2Fdiv%3E%3Cdiv+class%3D%22gb_da+gb_9c+gb_R%22+id%3D%22gbwa%22%3E%3Cdiv+class%3D%22gb_Qc%22%3E%3Ca+class%3D%22gb_b+gb_hc%22+href%3D%22https%3A%2F%2Fwww.google.com%2Fintl%2Fen%2Foptions%2F%22+title%3D%22Google+apps%22+aria-expanded%3D%22false%22+role%3D%22button%22+tabindex%3D%220%22%3E%3C%2Fa%3E%3Cdiv+class%3D%22gb_wb%22%3E%3C%2Fdiv%3E%3C%2Fbody%3E'
    7     1        NEW                                              $7      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $7
    8     4        INIT_FCALL                                               'libxml_use_internal_errors'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $10     
          7        ASSIGN                                                   !2, $10
    9     8        INIT_METHOD_CALL                                         !1, 'loadHTML'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
   10    11        INIT_FCALL                                               'libxml_use_internal_errors'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
   11    14        NEW                                              $14     'DOMXPath'
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !3, $14
   12    18        INIT_METHOD_CALL                                         !3, 'query'
         19        SEND_VAL_EX                                              'normalize-space%28%2F%2Fspan%5Bcontains%28%40class%2C+%22_c1%22%29+and+contains%28%40class%2C+%22ei_card_subtitle%22%29%5D%2Fbr%2Ffollowing-sibling%3A%3Atext%28%29%29'
         20        DO_FCALL                                      0  $17     
         21        ASSIGN                                                   !4, $17
   14    22      > FE_RESET_R                                       $19     !4, ->33
         23    > > FE_FETCH_R                                               $19, !5, ->33
   15    24    >   INIT_FCALL                                               'sscanf'
         25        FETCH_OBJ_R                                      ~20     !5, 'nodeValue'
         26        SEND_VAL                                                 ~20
         27        SEND_VAL                                                 '%25%5B0-9X%5D'
         28        DO_ICALL                                         $21     
         29        FETCH_DIM_R                                      ~22     $21, 0
         30        ECHO                                                     ~22
         31        ECHO                                                     '%0A'
   14    32      > JMP                                                      ->23
         33    >   FE_FREE                                                  $19
   16    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
206.33 ms | 1400 KiB | 17 Q