3v4l.org

run code in 500+ PHP versions simultaneously
<?php $tests = array( 'First line<br>second line<br>third line<br>', 'First line <br>second line <br>third line <br>', 'First line<br> second line<br> third line<br> ', 'First line <br> second line <br> third line <br> ', 'First line <br> second line<br>third line <br> ', 'First line <br> second line <br>third line <br> ', 'First line<br>second line <br> third line<br>', 'First line <br> second line<br> third line <br> ', 'First line<br> second line <br> third line<br> ', 'First line<br/>second line<br/>third line<br/>', 'First line <br/>second line <br/>third line <br/>', 'First line<br/> second line<br/> third line<br/> ', 'First line <br/> second line <br/> third line <br/> ', 'First line <br/> second line<br/>third line <br/> ', 'First line <br/> second line <br/>third line <br/> ', 'First line<br/>second line <br/> third line<br/>', 'First line <br/> second line<br/> third line <br/> ', 'First line<br/> second line <br/> third line<br/> ', 'First line<br />second line<br />third line<br />', 'First line <br />second line <br />third line <br />', 'First line<br /> second line<br /> third line<br /> ', 'First line <br /> second line <br /> third line <br /> ', 'First line <br /> second line<br />third line <br /> ', 'First line <br /> second line <br />third line <br /> ', 'First line<br />second line <br /> third line<br />', 'First line <br /> second line<br /> third line <br /> ', 'First line<br /> second line <br /> third line<br /> ', 'First line<br class="hide-on-mobile" /> second line <br class="hide-on-mobile" /> third line', ); foreach ( $tests as $test ) { echo trim( preg_replace( '/(\s)?<br(.*?)>(\s)?/', ' ', $test ) ), PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/o4elT
function name:  (null)
number of ops:  11
compiled vars:  !0 = $tests, !1 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   34     1      > FE_RESET_R                                           $3      !0, ->9
          2    > > FE_FETCH_R                                                   $3, !1, ->9
   35     3    >   FRAMELESS_ICALL_3                preg_replace        ~4      '%2F%28%5Cs%29%3F%3Cbr%28.%2A%3F%29%3E%28%5Cs%29%3F%2F', '+'
          4        OP_DATA                                                      !1
          5        FRAMELESS_ICALL_1                trim                ~5      ~4
          6        ECHO                                                         ~5
          7        ECHO                                                         '%0A'
   34     8      > JMP                                                          ->2
          9    >   FE_FREE                                                      $3
   36    10      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
171.58 ms | 2043 KiB | 13 Q