3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sql = "'" . str_repeat('a', 10*1024); $match = "/'(?:\'|\\{2}|[^'])*'/"; $sql = preg_replace($match, '', $sql); var_dump($sql);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UnZ2K
function name:  (null)
number of ops:  17
compiled vars:  !0 = $sql, !1 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'str_repeat'
          1        SEND_VAL                                                 'a'
          2        SEND_VAL                                                 10240
          3        DO_ICALL                                         $2      
          4        CONCAT                                           ~3      '%27', $2
          5        ASSIGN                                                   !0, ~3
    4     6        ASSIGN                                                   !1, '%2F%27%28%3F%3A%5C%27%7C%5C%7B2%7D%7C%5B%5E%27%5D%29%2A%27%2F'
    5     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 ''
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !0, $6
    6    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.91 ms | 1386 KiB | 19 Q