3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<EOD dsfgvsdfgv sdfgv sdfgv <span id="userStatusText" class="text-overflow ng-binding userstatus-editable" title="_epic Can I have Coffee" ng-class="{'userstatus-editable':profileHeaderLayout.mayUpdateStatus}" ng-bind="profileHeaderLayout.statusText|statusfilter" ng-click="revealStatusForm()">"_epic Can I have Coffee"</span> fdgvsdfgvsdfvg var_dumpgv dsfgv EOD; $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXPath($doc); foreach ($xpath->query('//span[@id="userStatusText"]') as $span) { echo $span->getAttribute('title'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 21
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/EdZCS
function name:  (null)
number of ops:  23
compiled vars:  !0 = $html, !1 = $doc, !2 = $xpath, !3 = $span
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'dsfgvsdfgv%0Asdfgv%0Asdfgv%0A%3Cspan+id%3D%22userStatusText%22+class%3D%22text-overflow+ng-binding+userstatus-editable%22+title%3D%22_epic+Can+I+have+Coffee%22+ng-class%3D%22%7B%27userstatus-editable%27%3AprofileHeaderLayout.mayUpdateStatus%7D%22+ng-bind%3D%22profileHeaderLayout.statusText%7Cstatusfilter%22+ng-click%3D%22revealStatusForm%28%29%22%3E%22_epic+Can+I+have+Coffee%22%3C%2Fspan%3E%0Afdgvsdfgvsdfvg%0Avar_dumpgv%0Adsfgv'
   13     1        NEW                                              $5      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $5
   14     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   15     7        NEW                                              $9      'DOMXPath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $9
   16    11        INIT_METHOD_CALL                                         !2, 'query'
         12        SEND_VAL_EX                                              '%2F%2Fspan%5B%40id%3D%22userStatusText%22%5D'
         13        DO_FCALL                                      0  $12     
         14      > FE_RESET_R                                       $13     $12, ->21
         15    > > FE_FETCH_R                                               $13, !3, ->21
   17    16    >   INIT_METHOD_CALL                                         !3, 'getAttribute'
         17        SEND_VAL_EX                                              'title'
         18        DO_FCALL                                      0  $14     
         19        ECHO                                                     $14
   16    20      > JMP                                                      ->15
         21    >   FE_FREE                                                  $13
   18    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.3 ms | 996 KiB | 13 Q