3v4l.org

run code in 300+ PHP versions simultaneously
<?php $reg = "/<script>.*?<\/script>/is"; $str = "<script>".str_repeat('1',10000000)."</script>"; //长度大于100014 var_dump(preg_match($reg, $str)); //返回NULL
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Nd37n
function name:  (null)
number of ops:  16
compiled vars:  !0 = $reg, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%3Cscript%3E.%2A%3F%3C%5C%2Fscript%3E%2Fis'
    4     1        INIT_FCALL                                               'str_repeat'
          2        SEND_VAL                                                 '1'
          3        SEND_VAL                                                 10000000
          4        DO_ICALL                                         $3      
          5        CONCAT                                           ~4      '%3Cscript%3E', $3
          6        CONCAT                                           ~5      ~4, '%3C%2Fscript%3E'
          7        ASSIGN                                                   !1, ~5
    5     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'preg_match'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.65 ms | 1385 KiB | 19 Q