Fix uses of trim as callback

trim function cannot be used as callback argument of array_walk since the second argument of the callback (array index) conflicts with the second argument of trim (characters to trim) dealing in unexpected behaviors.
Fix Too many arguments in constructors

HHVM warns when calls a constructor with more arguments than needed.
fix docblock
[tests] Skip tests when required extension is not loaded
Fix real reason of the bug

Previous explanation is wrong, the source of the bug was https://bugs.php.net/bug.php?id=52971
[debug] Set correct SAPI on test
[crypt] Sets a non empty password in tests

For compatibility with HHVM
Merge pull request #5717 from Maks3w/hotfix/various-fixes

Hotfix/various fixes
Merge branch 'hotfix/5717' into develop

Close #5717