3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = json_encode(["foo"=>["password"=>"foo\\\"\"bar"]]); echo preg_replace('{("password"\s*:\s*)"(?:[^"\\\\]|(?:\\\\.))*"}', '$1"****"', $c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BjoCq
function name:  (null)
number of ops:  11
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'json_encode'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
    4     4        INIT_FCALL                                               'preg_replace'
          5        SEND_VAL                                                 '%7B%28%22password%22%5Cs%2A%3A%5Cs%2A%29%22%28%3F%3A%5B%5E%22%5C%5C%5D%7C%28%3F%3A%5C%5C.%29%29%2A%22%7D'
          6        SEND_VAL                                                 '%241%22%2A%2A%2A%2A%22'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $3      
          9        ECHO                                                     $3
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.97 ms | 1394 KiB | 17 Q