3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_value = preg_replace('#<(password)(?:[^>]+)?>.*?</\1>#s', '<password>REDACTED</password>', "'password' => 'r7d?=43uOk'"); $current_value = preg_replace('#([pP])assword => ([^$]+)#s', "$1assword => REDACTED", $current_value); $current_value = preg_replace('#([pP])assword":"([^"]+)"#s', '$1assword":"REDACTED"', $current_value); var_dump($current_value);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ccnmj
function name:  (null)
number of ops:  22
compiled vars:  !0 = $current_value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'preg_replace'
          1        SEND_VAL                                                 '%23%3C%28password%29%28%3F%3A%5B%5E%3E%5D%2B%29%3F%3E.%2A%3F%3C%2F%5C1%3E%23s'
          2        SEND_VAL                                                 '%3Cpassword%3EREDACTED%3C%2Fpassword%3E'
          3        SEND_VAL                                                 '%27password%27+%3D%3E+%27r7d%3F%3D43uOk%27'
          4        DO_ICALL                                         $1      
          5        ASSIGN                                                   !0, $1
    5     6        INIT_FCALL                                               'preg_replace'
          7        SEND_VAL                                                 '%23%28%5BpP%5D%29assword+%3D%3E+%28%5B%5E%24%5D%2B%29%23s'
          8        SEND_VAL                                                 '%241assword+%3D%3E+REDACTED'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $3      
         11        ASSIGN                                                   !0, $3
    6    12        INIT_FCALL                                               'preg_replace'
         13        SEND_VAL                                                 '%23%28%5BpP%5D%29assword%22%3A%22%28%5B%5E%22%5D%2B%29%22%23s'
         14        SEND_VAL                                                 '%241assword%22%3A%22REDACTED%22'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $5      
         17        ASSIGN                                                   !0, $5
    8    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.89 ms | 1395 KiB | 17 Q