It only matters for reflection, but hhas parameters with
default values need to specify the text of the string.
In addition, change reflection to report parameters with no
default value string as not having a default value, to avoid
crashing when trying to access it.
Update the "func" parameter of array_filter to have a valid
default. The other uses of defaults in array_map and array_filter
are just to get the proper behavior on too few/too many args,
and don't really correspond to default values.
In repo mode this does the right thing and returns the right constant, but for non-repo it thinks it is an undefined non-namespace constant. I'll have to do something more hardcore if that starts to matter
While I was in there, I made the correct name for `ReflectionParameter` that was added in 5.4 instead of the draft we copied.
In PHP 5.4 they added this class that encased the callback functions. The difficulty came with needing to fallback to the previously registered session handler.
Closes#792
Also, while I was in there I made the script not spew anything on the terminal.
@markw65 `array_filter` doesn't match the signature from php.net. Should it?
Trying to get CakePHP running on HHVM revealed warnings around SplFileObject flock() and fwrite(). E.g., HipHop Warning: flock() expects exactly 2 parameters, 1 given. Added default values for those particular parameters
Added PHP implementations for PHP SPL classes that are currently missing from HHVM. These include:
- SplDoublyLinkedList
- SplQueue and SplStack
- SplFixedArray
- SplHeap, SplMinHeap, and SplMaxHeap
- SplPriorityQueue
- SplTempFileObject
Closes#807
I noticed that directorty structure of hphp/system was a bit scattered, so
I consolidated things to reduce the total number of folders and to put
related things together with each other.
This diff moves the contents of "hphp/system/classes_hhvm" into
"hphp/system", it moves the contents of "hphp/system/lib" into
"hphp/system", moves "hphp/idl" to "hphp/system/idl", and moves the
contents of "hphp/system/globals" into "hphp/system/idl".