3v4l.org

run code in 300+ PHP versions simultaneously
<?php function filterVarExportOneliner($text) { $replacement = '***'; return preg_replace( '/(\["password"\]=> string\([0-9]+\) )"([^"]+)"/', '\\1"' . $replacement . '"', $text ); } ob_start(); var_dump(array('controller' => 'index', 'action' => 'index', 'password' => 'h@x0r', 'login' => 'haxor@leet')); $dump = trim(preg_replace('/\s+/', ' ' , ob_get_clean())); var_dump(filterVarExportOneliner($dump));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Et5fn
function name:  (null)
number of ops:  23
compiled vars:  !0 = $dump
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'ob_start'
          1        DO_ICALL                                                 
   13     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                                 
   14     5        INIT_FCALL                                               'trim'
          6        INIT_FCALL                                               'preg_replace'
          7        SEND_VAL                                                 '%2F%5Cs%2B%2F'
          8        SEND_VAL                                                 '+'
          9        INIT_FCALL                                               'ob_get_clean'
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         14        DO_ICALL                                         $5      
         15        ASSIGN                                                   !0, $5
   16    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'filtervarexportoneliner'
         18        SEND_VAR                                                 !0
         19        DO_FCALL                                      0  $7      
         20        SEND_VAR                                                 $7
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Function filtervarexportoneliner:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Et5fn
function name:  filterVarExportOneliner
number of ops:  11
compiled vars:  !0 = $text, !1 = $replacement
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, '%2A%2A%2A'
    5     2        INIT_FCALL                                               'preg_replace'
    6     3        SEND_VAL                                                 '%2F%28%5C%5B%22password%22%5C%5D%3D%3E+string%5C%28%5B0-9%5D%2B%5C%29+%29%22%28%5B%5E%22%5D%2B%29%22%2F'
    7     4        CONCAT                                           ~3      '%5C1%22', !1
          5        CONCAT                                           ~4      ~3, '%22'
          6        SEND_VAL                                                 ~4
    8     7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9      > RETURN                                                   $5
   10    10*     > RETURN                                                   null

End of function filtervarexportoneliner

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.44 ms | 1390 KiB | 24 Q