3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = json_encode(["foo"=>["password"=>"foo\\\"bar"]]); echo $c; echo preg_replace('{("password"\s*:\s*)"(?:\\\\\\\\)*"}', '$1"****"');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EGQCq
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        ECHO                                                     !0
    5     5        INIT_FCALL                                               'preg_replace'
          6        SEND_VAL                                                 '%7B%28%22password%22%5Cs%2A%3A%5Cs%2A%29%22%28%3F%3A%5C%5C%5C%5C%29%2A%22%7D'
          7        SEND_VAL                                                 '%241%22%2A%2A%2A%2A%22'
          8        DO_ICALL                                         $3      
          9        ECHO                                                     $3
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.54 ms | 1394 KiB | 17 Q