<?php
$filterKeys = array(
'ticket',
'password',
'pass_word',
'passcode',
'pass_code',
'paypassword',
'pay_password'
);
function filterKeysCallback(array &$list, &$filterKeys) {
foreach($list as $key => &$item) {
if (is_array($item)) {
filterKeysCallback($item, $filterKeys);
continue;
}
if (in_array($key, $filterKeys)) {
var_dump($key, $filterKeys, in_array($key, $filterKeys)); exit();
$item = str_repeat('x', strlen($item));
}
}
unset($item);
};
$params = array(
'get' => array(
0 => '1231',
1 => '456'
);
);
filterKeysCallback($params['get'], $filterKeys);
- Output for 5.3.26, 5.4.16
- Parse error: syntax error, unexpected ';', expecting ')' in /in/6LdGh on line 34
Process exited with code 255. - Output for 5.3.0 - 5.3.24, 5.4.0 - 5.4.15
- Parse error: syntax error, unexpected ';', expecting ')' in 1LHE6 on line 34
Process exited with code 255. - Output for 5.3.25
- Parse error: syntax error, unexpected ';', expecting ')' in /in/1LHE6 on line 34
Process exited with code 255.
preferences:
181.29 ms | 1395 KiB | 51 Q