3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=<<<TXT Text1 Text2 Text3 Text4 TXT; echo preg_replace('#\n\s*(\n|$)#','',$str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G5RUB
function name:  (null)
number of ops:  8
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Text1%0AText2%0A%0A%0A%0AText3%0A%0A%0A%0AText4'
   15     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%23%5Cn%5Cs%2A%28%5Cn%7C%24%29%23'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
          7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.91 ms | 1394 KiB | 15 Q