3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = <<<TXT First chunk doesn't start with any delimiter. ****** Second chunk is separated from the first one by six asterisks plus a carriage return. ****** Third chunk is separated from the second one by six asterisks plus a carriage return. ****** And son on... and on. ****** But we might find other asterisks, maybe six like ****** inside the paragraph, and those one are not to be split. Same for new lines without ****** which should stay the same. TXT; var_export( preg_split('/\R*^\*{6}$\R*/m', $txt, 0, PREG_SPLIT_NO_EMPTY) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5UBOW
function name:  (null)
number of ops:  11
compiled vars:  !0 = $txt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'First+chunk+doesn%27t+start+with+any+delimiter.%0A%2A%2A%2A%2A%2A%2A%0ASecond+chunk+is+separated+from+the+first+one+by+six+asterisks+plus+a+carriage+return.%0A%2A%2A%2A%2A%2A%2A%0AThird+chunk+is+separated+from+the+second+one+by+six+asterisks+plus+a+carriage+return.%0A%2A%2A%2A%2A%2A%2A%0AAnd+son+on...+and+on.%0A%2A%2A%2A%2A%2A%2A%0ABut+we+might+find+other+asterisks%2C+maybe+six+like+%2A%2A%2A%2A%2A%2A+inside+the+paragraph%2C+and+those+one+are+not+to+be+split.%0A%0ASame+for+new+lines+without+%2A%2A%2A%2A%2A%2A+which+should+stay+the+same.'
   17     1        INIT_FCALL                                               'var_export'
   18     2        INIT_FCALL                                               'preg_split'
          3        SEND_VAL                                                 '%2F%5CR%2A%5E%5C%2A%7B6%7D%24%5CR%2A%2Fm'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 1
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
   17     9        DO_ICALL                                                 
   19    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
205.12 ms | 1000 KiB | 15 Q