3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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));
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
string(109) "array(4) { ["controller"]=> string(5) "index" ["action"]=> string(5) "index" ["password"]=> string(5) "***" }"
Output for hhvm-3.10.0

Process exited with code 153.