3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = " put returns between paragraphs for linebreak add 2 spaces at end "; var_export( preg_replace('/\v+/', ' ', trim($string)) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Fe9o
function name:  (null)
number of ops:  8
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%0Aput+returns+between+paragraphs%0A%0Afor+linebreak+add+2+spaces+at+end%0A%0A'
   10     1        INIT_FCALL                                                   'var_export'
   11     2        FRAMELESS_ICALL_1                trim                ~2      !0
          3        FRAMELESS_ICALL_3                preg_replace        ~3      '%2F%5Cv%2B%2F', '+'
          4        OP_DATA                                                      ~2
          5        SEND_VAL                                                     ~3
   10     6        DO_ICALL                                                     
   12     7      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.54 ms | 1589 KiB | 14 Q