3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "Oele\nBoele\n\nDus Want\n\nBlaaaaaaaaaaaa"; $text = '<p>' . $text . '</p>'; $text = preg_replace('#\n\n#', '</p><p>', $text); $text = preg_replace('#\n#', '<br />', $text); $text = preg_replace('#><#', ">\n<", $text); echo $text;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g2j5Q
function name:  (null)
number of ops:  24
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Oele%0ABoele%0A%0ADus+Want%0A%0ABlaaaaaaaaaaaa'
    5     1        CONCAT                                           ~2      '%3Cp%3E', !0
          2        CONCAT                                           ~3      ~2, '%3C%2Fp%3E'
          3        ASSIGN                                                   !0, ~3
    6     4        INIT_FCALL                                               'preg_replace'
          5        SEND_VAL                                                 '%23%5Cn%5Cn%23'
          6        SEND_VAL                                                 '%3C%2Fp%3E%3Cp%3E'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !0, $5
    7    10        INIT_FCALL                                               'preg_replace'
         11        SEND_VAL                                                 '%23%5Cn%23'
         12        SEND_VAL                                                 '%3Cbr+%2F%3E'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !0, $7
    8    16        INIT_FCALL                                               'preg_replace'
         17        SEND_VAL                                                 '%23%3E%3C%23'
         18        SEND_VAL                                                 '%3E%0A%3C'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $9      
         21        ASSIGN                                                   !0, $9
   10    22        ECHO                                                     !0
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.5 ms | 1395 KiB | 15 Q