3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<HTML <p>my text 1</p> some other content <p>some other paragraph followed by an html line break</p><br> etc... HTML; $string = preg_replace('~</?[a-z]+>\R(*SKIP)(*FAIL)|$~m', '<br>', $string); var_export($string); echo "\n----\n"; var_export(json_encode($string));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C7nov
function name:  (null)
number of ops:  18
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cp%3Emy+text+1%3C%2Fp%3E%0Asome+other+content%0A%3Cp%3Esome+other+paragraph+followed+by+an+html+line+break%3C%2Fp%3E%3Cbr%3E%0Aetc...'
    9     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%7E%3C%2F%3F%5Ba-z%5D%2B%3E%5CR%28%2ASKIP%29%28%2AFAIL%29%7C%24%7Em'
          3        SEND_VAL                                                 '%3Cbr%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
   11     7        INIT_FCALL                                               'var_export'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   12    10        ECHO                                                     '%0A----%0A'
   13    11        INIT_FCALL                                               'var_export'
         12        INIT_FCALL                                               'json_encode'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $5      
         15        SEND_VAR                                                 $5
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.18 ms | 1012 KiB | 16 Q