<?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.4.16
- Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting ')' in /in/Xb8ft on line 33
Process exited with code 255. - Output for 5.4.0 - 5.4.15
- Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting ')' in bSuS6 on line 33
Process exited with code 255. - Output for 5.3.25 - 5.3.26
- Parse error: syntax error, unexpected T_LNUMBER, expecting ')' in /in/Xb8ft on line 33
Process exited with code 255. - Output for 5.3.0 - 5.3.24
- Parse error: syntax error, unexpected T_LNUMBER, expecting ')' in bSuS6 on line 33
Process exited with code 255.
preferences:
155.41 ms | 1395 KiB | 51 Q