Add option to raise E_RECOVERABLE_ERROR when return typehints fail

This updates HHVM so that the CheckReturnTypehints option to has a setting
to enable hard enforcement for return typehints.

Reviewed By: @jdelong

Differential Revision: D1216186
Config to set SSL Next Protocols

Though LibEventServer doesn't support SPDY yet, that doesn't preclude other server implementations from advertising SPDY.

Reviewed By: dcsommer

Differential Revision: D1218013
emitIsTypeTest shouldn't assert if it receives a constant

This only shows up if you disable the extra simplifier pass,
but it fits with our philosophy that codegen should be able to handle
any valid IR, even if it handles it by punting, which is what will
happen in this case.

Reviewed By: @alexmalyshev

Differential Revision: D1217428
Dont segfault in UrlFile::open if http_response_header is unset

Closes #1249

Reviewed By: @ptarjan

Differential Revision: D1214777
Handle Mov in getStackValue

With the extra simplifier pass disabled the postcondition
analyzer finds a Mov in the SP chain that is a result of a guard being
relaxed away.  Since getStackValue didn't know what to do with a Mov
it would assert.

Reviewed By: @ottoni

Differential Revision: D1217439
accept file which has only <?php directive, followed by EOF (Zend compat)

Zend will accept a file that has only <?php directive in it (with no further whitespace or newline.  HHVM gave a parse error.   The issue is in the lexer.   Unfortunately, detecting EOF in flex seems to be a little annoying, because while there is <<EOF>> pattern, it is only valid to use it by itself, not as part of a more complex pattern.   The rule in question is on line 733 in hphp.ll.  We want to make sure that <?php is followed by whitespace or a newline, i.e. not <?phpsomeothercrap...  There is no good way to put the EOF test here.

My proposal is to have add a new rule for just "<?php".  Since the original rule on 733 will match a longer text (including the whitespace or newline), it will get the priority in most cases.  If we match just '<?php', we enter a new state ST_IN_PHP_OPEN_TAG, where it is not valid to have any further symbols.  Since the EOF is not a separate symbol in lex, the empty file will pass and not hit the rule on L763.  L763 will cause an error in all other cases.

If this seems too convoluted, another approach to solving this is just to append a new line to any source text before attempting to lex it.  This is smaller fix, but seems kinda hacky.

Zend has a similar special handling, look for "inline_char_handler:" in zend_language_scanner.l.

Reviewed By: @ptarjan

Differential Revision: D1215503
kill apache_get_scoreboard

this isn't a real php function

Reviewed By: @elgenie

Differential Revision: D1218772
don't spew if .hdf files are loaded as ini

All options to `-c` are loaded as both HDF and INI. Getting syntax warnings that don't make sense for ini files is bad. I already have this in place for hdf files.

Reviewed By: @fredemmott

Differential Revision: D1216126
don't use memory manager for ini_errors

This might happen before MM is up and running

Reviewed By: @fredemmott

Differential Revision: D1216129
Delete various dead FB-only call_user_func-style extension functions

call_user_func_serialized, call_user_func_rpc and
call_user_func_array_rpc.

Reviewed By: @paroski

Differential Revision: D1212642
make var_dump() for DateTime match php5

outputing something is much better than nothing

Closes #1691

Reviewed By: @fredemmott

Differential Revision: D1216113
fix trunk

This file was juggled around and the automatic rebase thought inserting it for the other class made sense.

Reviewed By: @fredemmott

Differential Revision: D1219327
Remove some dead/dying ArrayData stuff

Several constructors were never called.  m_allocMode was now
stored to but never read from (except for asserts).  destroy() was
called in one place.  Several comments were comically out of date
(including talking about virtual functions)---I didn't address all of
that in this diff, though.

Reviewed By: @markw65

Differential Revision: D1215183
Remove dump member functions on the FooDatas, and fb_const_fetch

The dumps probably started as an early debugging tool.  If we
want to print them now, though, it should be part of some kind of
pretty printer module (e.g. VariableSerializer), not part of the core
runtime data structures themselves.

Reviewed By: @dariorussi

Differential Revision: D1215416
Partially pull out apc const_load and uncompressed load support

We don't use either of these anymore, but apc_prime.so built
with a new hhvm has to work with an old hhvm, so we need to export the
symbols that it calls until we can remove it from the .so side.

Reviewed By: @dariorussi

Differential Revision: D1215744
kill dangling_server_proxy_new_request

I have no idea if this works. It was built in 2010 and not used.

Reviewed By: @markw65

Differential Revision: D1218790
Make treadmill usable generally with arbitrary function objects

Can hide some of the boilerplate of creating a class in some
cases (except that you can't move-capture until C++14, so some cases
we'll still need function objects).

Reviewed By: @dariorussi

Differential Revision: D1202423
Remove untakeable conditional jumps, turn on RemoveDeadBlocks

When the flag was on, it turned conditional jumps that are
always taken into unconditional jumps, but nothing was removing
conditional jumps that are never taken.

Reviewed By: @bertmaher

Differential Revision: D1208887
Implement enc_type option for http_build_query

Closes #1485

refs guzzle/guzzle#538

Reviewed By: @ptarjan

Differential Revision: D1215291
fix eval('return null;')

`ConstantExpression::getScalarValue` seems to reset the variable you pass it, which turns null into uninit_null. This spews a warning when you use it. I'm a bit scared of changing the fucntions, so I just changed the callsite.

Closes #1161

Reviewed By: @alexmalyshev

Differential Revision: D1213506