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("|<([^>]+)>(.*?)</\1>|", $html, $treffer, PREG_SET_ORDER); echo "\nErgebnis:\n\n"; print_r($treffer); 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 = 13, Position 2 = 23
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 23
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/fQHZW
function name:  (null)
number of ops:  25
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                                                 '%7C%3C%28%5B%5E%3E%5D%2B%29%3E%28.%2A%3F%29%3C%2F%01%3E%7C'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        SEND_VAL                                                 2
          7        DO_ICALL                                                 
    6     8        ECHO                                                     '%0AErgebnis%3A%0A%0A'
    7     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
    8    12      > FE_RESET_R                                       $6      !1, ->23
         13    > > FE_FETCH_R                                               $6, !2, ->23
    9    14    >   FETCH_DIM_R                                      ~7      !2, 0
         15        CONCAT                                           ~8      'gefunden%3A+', ~7
         16        CONCAT                                           ~9      ~8, '%0A'
         17        ECHO                                                     ~9
   10    18        FETCH_DIM_R                                      ~10     !2, 1
         19        CONCAT                                           ~11     'Teil+1%3A+', ~10
         20        CONCAT                                           ~12     ~11, '%0A'
         21        ECHO                                                     ~12
    8    22      > JMP                                                      ->13
         23    >   FE_FREE                                                  $6
   11    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.85 ms | 1395 KiB | 17 Q