3v4l.org

run code in 300+ 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 = 14
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/o4elT
function name:  (null)
number of ops:  16
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, ->14
          2    > > FE_FETCH_R                                               $3, !1, ->14
   35     3    >   INIT_FCALL                                               'trim'
          4        INIT_FCALL                                               'preg_replace'
          5        SEND_VAL                                                 '%2F%28%5Cs%29%3F%3Cbr%28.%2A%3F%29%3E%28%5Cs%29%3F%2F'
          6        SEND_VAL                                                 '+'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                         $5      
         11        ECHO                                                     $5
         12        ECHO                                                     '%0A'
   34    13      > JMP                                                      ->2
         14    >   FE_FREE                                                  $3
   36    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.37 ms | 1460 KiB | 15 Q