3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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.0 - 5.4.16
Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting ')' in /in/bSuS6 on line 33
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected T_LNUMBER, expecting ')' in /in/bSuS6 on line 33
Process exited with code 255.