3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<tr class="odd"> <td>姓名:张三</td> <td>年龄:29</td> </tr>'; $patt = '#<tr\s+(?:(?!>\s+<td>姓名:)(?:.|\n))+>\s+<td>姓名:((?:(?!</td>\s+<td>年龄:)(?:.|\n))+)</td>\s+<td>年龄:((?:(?!</td>\s+</tr>)(?:.|\n))+)</td>\s+</tr>#'; preg_match($str, $patt, $match); print_r($match);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UEWjc
function name:  (null)
number of ops:  11
compiled vars:  !0 = $str, !1 = $patt, !2 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Ctr+class%3D%22odd%22%3E%0A++%3Ctd%3E%E5%A7%93%E5%90%8D%EF%BC%9A%E5%BC%A0%E4%B8%89%3C%2Ftd%3E%0A++%3Ctd%3E%E5%B9%B4%E9%BE%84%EF%BC%9A29%3C%2Ftd%3E%0A%3C%2Ftr%3E'
    7     1        ASSIGN                                                   !1, '%23%3Ctr%5Cs%2B%28%3F%3A%28%3F%21%3E%5Cs%2B%3Ctd%3E%E5%A7%93%E5%90%8D%EF%BC%9A%29%28%3F%3A.%7C%5Cn%29%29%2B%3E%5Cs%2B%3Ctd%3E%E5%A7%93%E5%90%8D%EF%BC%9A%28%28%3F%3A%28%3F%21%3C%2Ftd%3E%5Cs%2B%3Ctd%3E%E5%B9%B4%E9%BE%84%EF%BC%9A%29%28%3F%3A.%7C%5Cn%29%29%2B%29%3C%2Ftd%3E%5Cs%2B%3Ctd%3E%E5%B9%B4%E9%BE%84%EF%BC%9A%28%28%3F%3A%28%3F%21%3C%2Ftd%3E%5Cs%2B%3C%2Ftr%3E%29%28%3F%3A.%7C%5Cn%29%29%2B%29%3C%2Ftd%3E%5Cs%2B%3C%2Ftr%3E%23'
    8     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
   10     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.12 ms | 1386 KiB | 17 Q