3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<SOURCE <header class="ipl-header"> <div class="ipl-header__content"> <h4 name="producers" id="producers" class="ipl-header__content ipl-list-title"> Produced by </h4> </div> <a class="ipl-header__edit-link" href="https://contribute.imdb.com/updates?update=tt2527336:producers">Edit</a> </header> <table class="subpage_data spFirst crew_list"> <tbody> <tr class="even"> <td class="name"> <a href="/name/nm0009190/?ref_=tt_rv" >J.J. Abrams</a> </td> <td>...</td> <td>executive producer</td> </tr> <tr class="odd"> <td class="name"> <a href="/name/nm0027297/?ref_=tt_rv" >Pippa Anderson</a> </td> <td>...</td> <td>co-producer</td> </tr> </tbody> </table> SOURCE; $pattern = "/<td class=\"name\">\n\s+<a[^>]+>(.*)(?=<\/a>)/"; preg_match_all($pattern, $html, $matches); print_r($matches[1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B5I1R
function name:  (null)
number of ops:  12
compiled vars:  !0 = $html, !1 = $pattern, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cheader+class%3D%22ipl-header%22%3E%0A++++%3Cdiv+class%3D%22ipl-header__content%22%3E%0A++++++++%3Ch4+name%3D%22producers%22+id%3D%22producers%22+class%3D%22ipl-header__content+ipl-list-title%22%3E%0A++++++++++++Produced+by%0A++++++++%3C%2Fh4%3E%0A++++%3C%2Fdiv%3E%0A++++%3Ca+class%3D%22ipl-header__edit-link%22+href%3D%22https%3A%2F%2Fcontribute.imdb.com%2Fupdates%3Fupdate%3Dtt2527336%3Aproducers%22%3EEdit%3C%2Fa%3E%0A%3C%2Fheader%3E%0A%3Ctable+class%3D%22subpage_data+spFirst+crew_list%22%3E%0A++++%3Ctbody%3E%0A++++%3Ctr+class%3D%22even%22%3E%0A++++++++%3Ctd+class%3D%22name%22%3E%0A++++++++++++%3Ca+href%3D%22%2Fname%2Fnm0009190%2F%3Fref_%3Dtt_rv%22%0A++++++++++++%3EJ.J.+Abrams%3C%2Fa%3E%0A++++++++%3C%2Ftd%3E%0A++++++++%3Ctd%3E...%3C%2Ftd%3E%0A++++++++%3Ctd%3Eexecutive+producer%3C%2Ftd%3E%0A++++%3C%2Ftr%3E%0A++++%3Ctr+class%3D%22odd%22%3E%0A++++++++%3Ctd+class%3D%22name%22%3E%0A++++++++++++%3Ca+href%3D%22%2Fname%2Fnm0027297%2F%3Fref_%3Dtt_rv%22%0A++++++++++++%3EPippa+Anderson%3C%2Fa%3E%0A++++++++%3C%2Ftd%3E%0A++++++++%3Ctd%3E...%3C%2Ftd%3E%0A++++++++%3Ctd%3Eco-producer%3C%2Ftd%3E%0A++++%3C%2Ftr%3E%0A++++%3C%2Ftbody%3E%0A%3C%2Ftable%3E'
   33     1        ASSIGN                                                   !1, '%2F%3Ctd+class%3D%22name%22%3E%0A%5Cs%2B%3Ca%5B%5E%3E%5D%2B%3E%28.%2A%29%28%3F%3D%3C%5C%2Fa%3E%29%2F'
   34     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
   35     7        INIT_FCALL                                               'print_r'
          8        FETCH_DIM_R                                      ~6      !2, 1
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.77 ms | 1438 KiB | 15 Q