3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = <<<HTML <div class="tabs_container"> <ul class="tabs"> ##BEGINLOOP##gAs## <li><a href="#">##title##</a></li> ##ENDLOOP## </ul> ##BEGINLOOP##LI## <div class="tabs_content">##title## is ##content##</div> ##ENDLOOP## </div> HTML; $parts = preg_split('/(?:##BEGINLOOP##)([a-zA-Z]*)##(.+?)(?:##ENDLOOP##)/s', $subject, -1, PREG_SPLIT_DELIM_CAPTURE); var_dump($parts);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RK010
function name:  (null)
number of ops:  12
compiled vars:  !0 = $subject, !1 = $parts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cdiv+class%3D%22tabs_container%22%3E%0A%3Cul+class%3D%22tabs%22%3E%0A++++%23%23BEGINLOOP%23%23gAs%23%23%0A++++++++%3Cli%3E%3Ca+href%3D%22%23%22%3E%23%23title%23%23%3C%2Fa%3E%3C%2Fli%3E%0A++++%23%23ENDLOOP%23%23%0A%3C%2Ful%3E%0A++++%23%23BEGINLOOP%23%23LI%23%23%0A++++%3Cdiv+class%3D%22tabs_content%22%3E%23%23title%23%23+is+%23%23content%23%23%3C%2Fdiv%3E%0A++++%23%23ENDLOOP%23%23%0A%3C%2Fdiv%3E'
   16     1        INIT_FCALL                                               'preg_split'
          2        SEND_VAL                                                 '%2F%28%3F%3A%23%23BEGINLOOP%23%23%29%28%5Ba-zA-Z%5D%2A%29%23%23%28.%2B%3F%29%28%3F%3A%23%23ENDLOOP%23%23%29%2Fs'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 -1
          5        SEND_VAL                                                 2
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !1, $3
   18     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.05 ms | 1394 KiB | 17 Q