3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "<td class='postac'>Actelsar </td> <td class='postac'>tabl. 80 mg 28 tabl.</td> <td class='postac'> 3 &lt; 4</td><td class=\"postac\"> or <td class= 'postac'> or <td class='postac' > or <td class='postac' id='foo'> or <td class='postac'>"; preg_match_all("/<td class='postac'>([^<]+)</", $str,$m); $doc = new DOMDocument(); $doc->loadHTML($str); $xpath = new DOMXPath($doc); $nodes = $xpath->query('//td[@class="postac"]'); $result = array(); for($i=0;$i<$nodes->length; $i++){ $result[]=$nodes->item($i)->textContent; } print_r($m[1]); print_r($result); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 23
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 23
Branch analysis from position: 33
Branch analysis from position: 23
filename:       /in/8tXgA
function name:  (null)
number of ops:  41
compiled vars:  !0 = $str, !1 = $m, !2 = $doc, !3 = $xpath, !4 = $nodes, !5 = $result, !6 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Ctd+class%3D%27postac%27%3EActelsar+%3C%2Ftd%3E%0A%3Ctd+class%3D%27postac%27%3Etabl.+80+mg+28+tabl.%3C%2Ftd%3E%0A%3Ctd+class%3D%27postac%27%3E+3+%26lt%3B+4%3C%2Ftd%3E%3Ctd+class%3D%22postac%22%3E+or+%3Ctd+class%3D+%27postac%27%3E+or+%3Ctd+class%3D%27postac%27+%3E+or+%3Ctd+class%3D%27postac%27+id%3D%27foo%27%3E+or+%3Ctd+class%3D%27postac%27%3E'
    6     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%3Ctd+class%3D%27postac%27%3E%28%5B%5E%3C%5D%2B%29%3C%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    8     6        NEW                                              $9      'DOMDocument'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $9
    9     9        INIT_METHOD_CALL                                         !2, 'loadHTML'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
   10    12        NEW                                              $13     'DOMXPath'
         13        SEND_VAR_EX                                              !2
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !3, $13
   11    16        INIT_METHOD_CALL                                         !3, 'query'
         17        SEND_VAL_EX                                              '%2F%2Ftd%5B%40class%3D%22postac%22%5D'
         18        DO_FCALL                                      0  $16     
         19        ASSIGN                                                   !4, $16
   12    20        ASSIGN                                                   !5, <array>
   13    21        ASSIGN                                                   !6, 0
         22      > JMP                                                      ->30
   14    23    >   INIT_METHOD_CALL                                         !4, 'item'
         24        SEND_VAR_EX                                              !6
         25        DO_FCALL                                      0  $21     
         26        FETCH_OBJ_R                                      ~22     $21, 'textContent'
         27        ASSIGN_DIM                                               !5
         28        OP_DATA                                                  ~22
   13    29        PRE_INC                                                  !6
         30    >   FETCH_OBJ_R                                      ~24     !4, 'length'
         31        IS_SMALLER                                               !6, ~24
         32      > JMPNZ                                                    ~25, ->23
   17    33    >   INIT_FCALL                                               'print_r'
         34        FETCH_DIM_R                                      ~26     !1, 1
         35        SEND_VAL                                                 ~26
         36        DO_ICALL                                                 
   18    37        INIT_FCALL                                               'print_r'
         38        SEND_VAR                                                 !5
         39        DO_ICALL                                                 
   20    40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.47 ms | 1400 KiB | 17 Q