facebook/hhvm — pull request #2467 by tstarling (2014-04-17 04:04:21+00:00)
Title: Fix varadic arguments

* Remove zPrepArgs(), just box on demand instead
* Fix broken vararg array creation in zend_parse_parameters()
* In ZendExecutionStack::getArg(), use the ExtraArgs interface to get varadic arguments, since they are not in the stack. Compare with f_func_get_arg().
* Use the ActRec passed to zend_wrap_func() instead of fetching an ActRec from global state.
* If an argument is requested which is beyond the valid range for the current function call, return a KindOfNull instead of a pointer to random memory. Store the null RefData in the request-local ZendExecutionStack, to avoid leaks.

* Added ezc_min(), with code copied from PHP 5.3's min(), with one minor change.

Submitted on behalf of a third-party: The PHP Group
Authors: Andi Gutmans, Zeev Suraski, Rasmus Lerdorf, Andrei Zmievski,
Stig Venaas, Jason Greene
License: Version 3.01 of the PHP license

* Added test case for ezc_min(), based on the for min() from PHP 5.6.0-dev.
* Added implementations of is_equal_function(), is_not_equal_function(), is_smaller_function(), is_smaller_or_equal_function() by copying from PHP 5.6.0-dev.

Submitted on behalf of a third-party: Zend Technologies Ltd.
Authors: Andi Gutmans, Zeev Suraski
License: Version 2.00 of the Zend license

* Added my own implementation of compare_function().