Minor fixes to PHP5 test importer

Summary: * Exclude buggy test ext/gmp/tests/014.phpt
* Use __DIR__ instead of getcwd() in tests/security/open_basedir.inc
* Deal with having false passed to utf8Sanitize()
* Add more "other files"

Prep for PHP-5.6.0 test import

Reviewed By: @fredemmott

Differential Revision: D1556259
hh_ide.js - remove unneeded declare_file call

Summary: caller needs to hh_add_file before they can call hh_check anyways, so declare file has already been called.

Reviewed By: @jwatzman

Differential Revision: D1562022
hh_ide.js perf - Don't parse if the parser_heap would already have it

Summary: We're doing this completely unnecessarily. If it's already in the parserheap, we don't need to parse it again.

Reviewed By: @jwatzman

Differential Revision: D1562087
Removed REX.W requirement for several instructions

Summary: Several SSE related instructions didn't require REX.W, but we were
generating them anyways. Now we don't generate a REX prefix if if these
instructions use xmm0-xmm7. If they do use xmm8-xmm15, we emit the REX prefix
byte with REX.R set (which we already did correctly).

Reviewed By: @edwinsmith

Differential Revision: D1548397
Fix potential security leak in HashContext

Summary: CVE-2014-6229

This is not a NUL-terminated string, it's a fixed-size block of data.
The risks were key truncation (if there happens to be a NUL byte in the
key) or over-reading (which would be information leakage).

Reviewed By: @ptarjan

Differential Revision: D1533546
Remove the streams extension (just the stub)

Summary: The "stream extension" is actually a subset of the standard extension.

Reviewed By: @fredemmott

Differential Revision: D1561554
Admin command to dump regex cache

Summary: By the end of the weekend some machines have accumulated an oddly
large number of regular expressions.  We can use this to figure out what they
are and fix them.

Reviewed By: @mclarkelauer

Differential Revision: D1563554
Change CONTRIBUTING.md to suggest "probably easy" issues

Reviewed By: @paulbiss

Differential Revision: D1564003
Fix server tests broken by D1462817

Summary: When the main thread exits it calls ShutdownModules, which marks the extensions as unsorted.  Any unjoined threads will hit an assert when they exit.  In this case the 'watchdog' thread was joined a step too late in the shutdown process.

Reviewed By: @markw65

Differential Revision: D1562679
Convert some cg functions to SSA.

Summary: These are the easy cases that don't require conditionals
and phi nodes.

Reviewed By: @jasone

Differential Revision: D1556344
run test/tools/update-server-mode-blacklist.sh

Summary: @swtaarrs said this might fix the weird locale race

Reviewed By: @paulbiss, @swtaarrs

Differential Revision: D1564231
Prefix magic attributes with "__"

Summary: See linked task for full description, but here's the gist. In
the absence of real namespacing for user attributes, we should do the
same thing as PHP did for reserved functions: anything prefixed by `__`
might be magical in the runtime (in our case, in the typechecker).
Anything else is up for grabs by users of the language.

In that vein, prefix the handful of unprefixed magic attributes with
`__`. Maintain backwards compatibility support for the old names for a
little while.

Going forward, we should only make magic for user attributes prefixed
with `__`.

Namespacing support for user attributes might be a good idea, at which
point we can redo this, but it's complicated and no one is volunteering
to do it, so here we are.

Reviewed By: @int3

Differential Revision: D1559079
Make `spl_autoload_functions()` return the same as PHP

Summary: This fixes Callable format: Class::method isconsist with PHP

Closes #3700
Closes https://github.com/facebook/hhvm/pull/3776

Reviewed By: @fredemmott

Differential Revision: D1563676
Don't use system SQLite if headers not found.

Summary: Gentoo multilib environments may have situations when there is no 64-bit SQLite package installed but filesystem containts 32-bit libsqlite3.so and we have `LIBSQLITE3_LIBRARY` set, but not `LIBSQLITE3_INCLUDE_DIR` and `LIBSQLITE3_FOUND`. Don't try to use system SQLite headers if they are not present.

Fixes #3108.
Closes https://github.com/facebook/hhvm/pull/3774

Reviewed By: @fredemmott

Differential Revision: D1560875
Remove unused StringData::MakeMalloced and StringData::destruct()

Summary: These look to have been removed previously when moving to APCHandle.

Reviewed By: @markw65

Differential Revision: D1563581
Updated jemalloc from 3.5.1 to 3.6.0

Summary: Closes https://github.com/facebook/hhvm/pull/3784

Reviewed By: @jasone

Differential Revision: D1564962
Cleanup all the hacky eval stuff we were doing in hh_ide.js to export stuff

Summary: This is much cleaner. No more eval and easier to add stuff.

As an additional plus, this code will run in node.js now as well, so it'll be easier to test perf and write some tests.

Reviewed By: @jwatzman

Differential Revision: D1565143
Redis readtime implement bug maybe hangding

Summary: (1)gettimeout problem
Redis function getTimeout's timeout should be connect timeout  rather than read timeout..

reference:

https://github.com/nicolasff/phpredis/blob/master/redis.c

6926 lines of this file

(2)redis connect readtime problem

Developer  are used to set timeout(connecttimeout and readtime) in function connect,rather than setting setOption OPT_READ_TIMEOUT again,some developer forget set readtime maybe hhvm hangding when read data time out.

reference:
https://github.com/nicolasff/phpredis/blob/94e064940c488805485ad61a470ec9b34784f71f/library.c

1187 lines of this file

but hhvm implement functiom connect don't set readtimeout
Closes https://github.com/facebook/hhvm/pull/3752

Reviewed By: @sgolemon

Differential Revision: D1555481