3v4l.org

run code in 500+ PHP versions simultaneously
<?php $textbefore = "text has newlines in wo\nrds and normal newlines \n bewtween words and again in wo\nrds"; $textafter = preg_replace( "/(?<=\S)\n|\n(?=\S)/", '', $textbefore); var_dump( $textafter);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fOvOl
function name:  (null)
number of ops:  8
compiled vars:  !0 = $textbefore, !1 = $textafter
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'text+has+newlines+in+wo%0Ards+and+normal+newlines+%0A+bewtween+words+and+again+in+wo%0Ards'
    4     1        FRAMELESS_ICALL_3                preg_replace        ~3      '%2F%28%3F%3C%3D%5CS%29%0A%7C%0A%28%3F%3D%5CS%29%2F', ''
          2        OP_DATA                                                      !0
          3        ASSIGN                                                       !1, ~3
    5     4        INIT_FCALL                                                   'var_dump'
          5        SEND_VAR                                                     !1
          6        DO_ICALL                                                     
          7      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.44 ms | 2722 KiB | 14 Q