3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = '<!--TAG_INI-->' . str_repeat("a\n", 50000) . '<!--TAG_END-->'; $pattern = "/<!--TAG_INI-->(.|\n)*?<!--TAG_END-->/"; $content = preg_replace($pattern, 'foo', $content); var_dump($content);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ICria
function name:  (null)
number of ops:  18
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%28.%7C%0A%29%2A%3F%3C%21--TAG_END--%3E%2F'
    5     8        INIT_FCALL                                               'preg_replace'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 'foo'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !0, $7
    6    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
202.09 ms | 1399 KiB | 19 Q