3v4l.org

run code in 500+ PHP versions simultaneously
<?php $content = '<!--TAG_INI-->' . str_repeat("a\n", 50000) . '<!--TAG_END-->'; $pattern = "/<!--TAG_INI-->.*?<!--TAG_END-->/s"; $content = preg_replace($pattern, 'foo', $content); var_dump(strlen($content));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UUFM6
function name:  (null)
number of ops:  16
compiled vars:  !0 = $content, !1 = $pattern
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'str_repeat'
          1        SEND_VAL                                                     'a%0A'
          2        SEND_VAL                                                     50000
          3        DO_ICALL                                             $2      
          4        CONCAT                                               ~3      '%3C%21--TAG_INI--%3E', $2
          5        CONCAT                                               ~4      ~3, '%3C%21--TAG_END--%3E'
          6        ASSIGN                                                       !0, ~4
    4     7        ASSIGN                                                       !1, '%2F%3C%21--TAG_INI--%3E.%2A%3F%3C%21--TAG_END--%3E%2Fs'
    5     8        FRAMELESS_ICALL_3                preg_replace        ~7      !1, 'foo'
          9        OP_DATA                                                      !0
         10        ASSIGN                                                       !0, ~7
    6    11        INIT_FCALL                                                   'var_dump'
         12        STRLEN                                               ~9      !0
         13        SEND_VAL                                                     ~9
         14        DO_ICALL                                                     
         15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
179.03 ms | 3231 KiB | 15 Q