3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = 'blah etc user delboy1978uk insecure-password 123456 etc etc'; $regex = '#\nuser\s\w+\sinsecure-password\s.+\n#'; preg_match($regex, $file, $matches); $file = str_replace($matches[0], "\n", $file); echo $file;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BcDWK
function name:  (null)
number of ops:  16
compiled vars:  !0 = $file, !1 = $regex, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'blah%0Aetc%0Auser+delboy1978uk+insecure-password+123456%0Aetc%0Aetc'
    9     1        ASSIGN                                                   !1, '%23%5Cnuser%5Cs%5Cw%2B%5Csinsecure-password%5Cs.%2B%5Cn%23'
   10     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
   11     7        INIT_FCALL                                               'str_replace'
          8        FETCH_DIM_R                                      ~6      !2, 0
          9        SEND_VAL                                                 ~6
         10        SEND_VAL                                                 '%0A'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !0, $7
   13    14        ECHO                                                     !0
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
202.19 ms | 1005 KiB | 15 Q