fix DOCUMENT_ROOT for fastcgi

We shouldn't have spcialized code in here for fastcgi, and it didn't even work.

Reviewed By: @markw65

Differential Revision: D1109072
Made paramater of newInstanceArgs method optional

PHP documentation requires it to be optional, passing no
argument would call the constructor taking no arguments.

Reviewed By: @ptarjan

Differential Revision: D1109795
Reestablished PHP 5.3 compatibility in test runner

Fix compat issues with Zend PHP 5.3

Closes #1420

Reviewed By: @ptarjan

Differential Revision: D1110759

Pulled By: @scannell
Fix test runner

Fix test runner

Reviewed By: @edwinsmith

Differential Revision: D1110872
fix ob_get_contents return value

ob_get_contents returns false if not currently buffering output

Closes #1429

Reviewed By: @alexmalyshev

Differential Revision: D1110757

Pulled By: @scannell
Zend compatibility - stripslashes

Zend's implementation of stripslashes removes a trailing
backslash in a string, except in the empty string it is replaced by a
NUL. Prior to this PR, HHVM's implementation always replaced the
trailing backslash with a NUL. The reason is, HHVM unconditionally
appended the character following a backslash. When the string ends in
backslash, the following character is the null-terminator of the
underlying C-string.

This was identified because of a failing test in the WordPress test
suite.

Closes #1423

Reviewed By: @alexmalyshev

Differential Revision: D1110135

Pulled By: @scannell
Pass along error number when handling a fatal error

As no error number was being passed when a fatal error occurred, error_get_last() in a shutdown handler wasn't able to check if the error was fatal.

Closes #1408

Reviewed By: @alexmalyshev

Differential Revision: D1110032

Pulled By: @scannell
Change error exit code to be consistent with Zend

Errors now return -1 like PHP does.

Closes #1350
Closes #1405

Reviewed By: @ptarjan

Differential Revision: D1108693
Add ZendParamModeFalse

Add ZendParamModeFalse for chdir-like functions

Reviewed By: @ptarjan

Differential Revision: D1108735

Pulled By: @scannell
Make strrchr more compatible with Zend

The contract for strrchr is "If needle contains more than one character,
only the first is used". The implementation was using strrpos which
scans for the entire string, not just the first character, resulting in
an incompatibility. This PR request resolves that incompatibility.

Also, for the purposes of strrchr, zend treats the empty string as a NUL
character. This happens because the empty string is (apparently) handled
by the second rule for needle: "If needle is not a string, it is
converted to an integer and applied as the ordinal value of a
character."

Closes #1394

Reviewed By: @JoelMarcey

Differential Revision: D1108545

Pulled By: @scannell
Fixed setIteratorMode() in SplStack and SplQueue

setIteratorMode in SplStack didn't throw exception when mode
was invalid.

Closes #1426

Reviewed By: @alexmalyshev

Differential Revision: D1110182

Pulled By: @scannell
SplObjectStorage mutation fix

The current reimplementation of SplObjectStorage does not allow mutation
of "info" values attached to object keys in the case where the object is
already present in the object. This is inconsistent with PHP's behavior.

Closes #1388

Reviewed By: @ptarjan

Differential Revision: D1108349

Pulled By: @scannell
Fix SplDoublyLinkedList when using array syntax

If you append items to a SplDoublyLinkedList using array syntax
($foo[] = 'bar'), the tail would not be updated.

Example:

<?php
$stack = new SplStack();

$stack[] = "var1";
$stack[] = "var2";
$stack[] = "var3";

foreach ($stack as $var) {
    echo $var . "\n";
}

HHVM Output:

    var1

Correct Output:

    var3
    var2
    var1

Closes #1415
Closes #1421

Reviewed By: @alexmalyshev

Differential Revision: D1110142

Pulled By: @scannell
Fix ReflectionClass::implementsInterface with \

Fixed ReflectionClass::implementsInterface() with black slash
prefixed interface name

Closes #1424
Closes #1430

Reviewed By: @ptarjan

Differential Revision: D1110811

Pulled By: @scannell
Update NEWS for Appleseed

Reviewed By: @scannell

Differential Revision: D1110400
Fix ASAN tests

Fix use-after-free with imported systemlib module names

Reviewed By: @jdelong

Differential Revision: D1111011
Change eliminateRefcounts to convert instructions to Nops instead of erasing them

Otherwise the block may become empty and validation passes start to
complain.  It's simpler to just convert the instructions to Nop and
let DCE take care of cleaning things up.

Reviewed By: aravind

Differential Revision: D1109291
Strip generator's path info out of generated ini-parser file
Be honest, we're just not going to support 32bit.

The JIT specifically emits 64-bit x86 and will do so for
the forseeable future.
Rename CMake LibUODBC module.

Oops.  I misnamed it.