3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/(?<=\])(.*?)(?=\[\/)/m'; $str = '[test_tag with="attributes"]Content I [want] To capture[/test_tag]'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result echo $matches[0][0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qgcNg
function name:  (null)
number of ops:  13
compiled vars:  !0 = $re, !1 = $str, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%28%3F%3C%3D%5C%5D%29%28.%2A%3F%29%28%3F%3D%5C%5B%5C%2F%29%2Fm'
    4     1        ASSIGN                                                   !1, '%5Btest_tag+with%3D%22attributes%22%5DContent+I+%5Bwant%5D+To+capture%5B%2Ftest_tag%5D'
    6     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        SEND_VAL                                                 2
          7        SEND_VAL                                                 0
          8        DO_ICALL                                                 
    9     9        FETCH_DIM_R                                      ~6      !2, 0
         10        FETCH_DIM_R                                      ~7      ~6, 0
         11        ECHO                                                     ~7
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
204.51 ms | 996 KiB | 14 Q