3v4l.org

run code in 300+ 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:  13
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        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2F%5Cv%2B%2F'
          4        SEND_VAL                                                 '+'
          5        INIT_FCALL                                               'trim'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
   10    11        DO_ICALL                                                 
   12    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
129.56 ms | 1000 KiB | 16 Q