Revert "Remove PAM dependency code."

This reverts commit f114b7e6de372d968b439081a48b6954022b11a3.

The imap-uw (cclient) brew package on OS X still depends on PAM.

Reviewed By: @sgolemon
Add space to the error message

Closes #2224

Reviewed By: @gabelevi

Differential Revision: D1248913

Pulled By: @jwatzman
Remove infinity token

No clue wtf this is. Causes errors with vars named "infinity".
We don't rely on this anywhere.

watman

Reviewed By: @gabelevi

Differential Revision: D1230362
Test runner changes - monolog at 100%

- disable Zend compat for monolog, otherwise it tries to run mongodb tests
- don't proxy localhost or 127.0.0.1 for any tests

Reviewed By: @JoelMarcey

Differential Revision: D1248975
Unit test for jump optimizer

These are little peephole optimizations so the module is already pretty
independent.

I had to add a terminal instruction, to be able to end blocks without
having another block to jump to or a frame pointer and stuff to give to
RetCtrl.

Reviewed By: @bertmaher

Differential Revision: D1244555
don't put HH infront of class methods

mybad

Reviewed By: @elgenie

Differential Revision: D1244263
Teach the typechecker to understand Map appends

You can do `$map[] = Pair {$key, $value}`. It's pretty easy for the
typechecker to understand, so unless we're removing this functionality from
hhvm then we might as well support it.

This fixes #2253

Reviewed By: @jwatzman

Differential Revision: D1248858
Backport depth limit into ext_xml.cpp

Limit XML tree depth (backport of PHP bug #65236 / CVE-2013-4113). Upstream commit: http://git.php.net/?p=php-src.git;a=commit;h=7d163e8a0880ae8af2dd869071393e5dc07ef271

The upstream fix is a bit weird; the return value indicates success even though the tree was truncated. This diff replicates this behavior.

Reviewed By: @bertmaher

Differential Revision: D1212028
HHVM extension: Fix UTF-8 error recovery in json_encode.

When reading a multi-byte sequence, if the utf-8 reader encounters an invalid byte,
abort the sequence, output U+FFFD, and restart scanning at the invalid byte in JSON_FB_LOOSE mode.

Overriding the unit tests as they are wrong after this fix. I have a separate diff D1201123 for the unit tests.

Reviewed By: @ealf

Differential Revision: D1172887
Make Array(ArrayData*) constructor explicit

As a bonus this found lots of places where we should use the
marginally-more-efficient ArrayInit::toArray instead of
ArrayInit::create followed by an implicit conversion.

Reviewed By: @markw65

Differential Revision: D1248820
allow someone to make invariant() and func_get_args() in a namespace

Reviewed By: @elgenie

Differential Revision: D1244794
Added Mustache.php test runner

The framework is almost 100%, will be there when #1860 is implemented.
Closes #2208

Reviewed By: @fredemmott

Differential Revision: D1248703
Bump the variable that disables hhbbc

Facebook: This will enable it for the "H" release.

Reviewed By: @markw65

Differential Revision: D1248287
Make sure that NewElems never need to deal with KindOfUninit bases

There was a strange case in LvalNew that was producing
KindOfUninits inside of arrays, and the lvalBlackHole was KindOfUninit
instead of KindOfNull.  Looking around, nothing appears to be using
the fact that these are Uninit, but I noticed Uninit (and KindOfRef)
handling in IncDecBody and decided to clean it up as part of this.
Also this removes the unused Variant::lvalInvalid.

Reviewed By: @bertmaher

Differential Revision: D1235606
Fix some situations where EmptyArray allowed KindOfUninits into arrays

This was an unintentional difference from the old behavior in
these functions, and moves in the wrong direction.

Reviewed By: @jasone

Differential Revision: D1247639
Try to call __toString on objects passed to `file_put_contents`

Before it would just check to see if it was an object, raise a warning and then return false. Now it checks for a `__toString` method first, failing if it doesn't exist.

Fixes #1852
Closes #2251

Reviewed By: @fredemmott

Differential Revision: D1248715
Fixes for user filters

* Zend compatibility with property name dataLen -> datalen
* Ensures autoloader is invoked when adding filter

Resolves #2216
Closes #2217

Reviewed By: @fredemmott

Differential Revision: D1248706
Handle falsey values in stat and lstat

This is in the event of errors when constructing a file path might be propagated down. In any case, running these functions with the given test cases in Zend also returns false.
Closes #2212

Reviewed By: @fredemmott

Differential Revision: D1248705
Move most packed array code into a different module

Still uses a lot of code from HphpArray, and asPacked still
returns HphpArray*.  This is an intermeditate refactoring step for
having the layout differ from HphpArray more.

Reviewed By: @edwinsmith

Differential Revision: D1236653
Fix over-counting of HphpArray allocations in memory-profile.cpp

This code probably predated flat arrays, and wasn't updated.
Right now it's double counting the array payload for arrays larger
than HphpArray::SmallSize.

Reviewed By: @edwinsmith

Differential Revision: D1248333