3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = "<test1>\nDies ist ein Test\n</test1>\n<test2>\nUsw. usf.\n</test2>"; echo $html; preg_match_all("/<([\w]+)[^>]*>(.*?)<\/\1>/", $html, $treffer, PREG_SET_ORDER); foreach ($treffer as $wert) { echo "gefunden: " . $wert[0] . "\n"; echo "Teil 1: " . $wert[1] . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/Knv93
function name:  (null)
number of ops:  21
compiled vars:  !0 = $html, !1 = $treffer, !2 = $wert
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Ctest1%3E%0ADies+ist+ein+Test%0A%3C%2Ftest1%3E%0A%3Ctest2%3E%0AUsw.+usf.%0A%3C%2Ftest2%3E'
    3     1        ECHO                                                     !0
    4     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%3C%28%5B%5Cw%5D%2B%29%5B%5E%3E%5D%2A%3E%28.%2A%3F%29%3C%5C%2F%01%3E%2F'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        SEND_VAL                                                 2
          7        DO_ICALL                                                 
    5     8      > FE_RESET_R                                       $5      !1, ->19
          9    > > FE_FETCH_R                                               $5, !2, ->19
    6    10    >   FETCH_DIM_R                                      ~6      !2, 0
         11        CONCAT                                           ~7      'gefunden%3A+', ~6
         12        CONCAT                                           ~8      ~7, '%0A'
         13        ECHO                                                     ~8
    7    14        FETCH_DIM_R                                      ~9      !2, 1
         15        CONCAT                                           ~10     'Teil+1%3A+', ~9
         16        CONCAT                                           ~11     ~10, '%0A'
         17        ECHO                                                     ~11
    5    18      > JMP                                                      ->9
         19    >   FE_FREE                                                  $5
    8    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.72 ms | 1395 KiB | 15 Q