Shortcircuit the check for an empty ini file and do nothing if empty

when ini file in runtime config is empty we want to do nothing. Literally nothing

Reviewed By: @markw65

Differential Revision: D1075478
Fix invalid Func free

Generators that aren't closures still need to subtract
one pointer's worth from the Func* to get the address of the memory
to free.

Reviewed By: @jano

Differential Revision: D1075816
Add test case for unset-last-element followed by append

This demonstrates that the 'next-int-key' state of the array
is not modified by unset, even for the last element.
(php 5.3 and 5.5 do the same thing).

Reviewed By: @ptarjan

Differential Revision: D1074810
actually fix DateTime on travis

sadpanda

https://travis-ci.org/facebook/hhvm/jobs/14586597

Reviewed By: @markw65

Differential Revision: D1076759
ReflectionMethod supports getPrototype

ReflectionMethod will support method getPrototype().

**Please note I added an extra field "originalClass" to class ReflectionMethod because the exception message in ReflectionMethod::getPrototype() needs the original class name. (To be compatible with Zend)**

For example:

  class Base { public function test() {} }
  class Child extends Base {}
  $rf=ReflectionMethod('Child', 'test')

Then $rf->class will be "Base" while $rf->originalClass will be "Child".

The implementation for Func* is coming from https://github.com/php/php-src/blob/0d7a6388663b76ebed6585ac92dfca5ef65fa7af/ext/reflection/php_reflection.c (using Func->baseCls). The difference is that we need to deal with interfaces because Func->baseCls didn't consider interfaces.

For builtin classes, because MethodInfo* doesn't contain baseCls information, so we need to implement the logic from scratch.

Reviewed By: @ptarjan

Differential Revision: D1048239
Finally statement support for HHVM.

Finally logic is handled by a new component: FinallyRouter.
The approach taken essentially constructs a simple finite
state automaton that decides which action to take next, once
the control reaches the end of a finally block. The
automaton uses an unnamed local variable "state". It also
uses an additional unnamed local to stash result between the
point of actually returning from a function and invoking
return. In order to minimize perf impact, two copies of
finally blocka are in fact emitted. The first copy ends with
a switch statement and is part of the automaton. The second
copy handles exceptional situations exclusively and ends
with Unwind. When multiple nested finallies exist, multiple
copies of a fault funclet corresponding to the inner finally
will be emitted in order to correctly handle chaining.
Exception chaining is handled using an extended set of
members in Fault (m_raiseLevel, m_raiseFrame,
m_raiseNesting). These values are used to decide whether two
exceptions stored on the top of the m_faults stack should be
chained already, or not yet. Additionally, changes have been
made to grammar files and AST in order to give the emitter
more information about the scope of goto labels. This is
used in order to handle goto from try finally block
correctly. No jumps into try finally are allowed, since
reference implementation (Zend) fatals in this case.

Reviewed By: @paroski

Differential Revision: D1058497
Update array_filter() to support collections

Updates array_filter() to support collections, and removes the old C++
implementation of array_filter() which is no longer used. This diff also
updates "foreach ($x as $k => $v)" for Set and FrozenSet so that the
current value is assigned into both $k and $v.

Reviewed By: @dariorussi

Differential Revision: D1071459
Don't rewrite license headers in submodules