Make preg_match return darray instead of PHP array
Summary:
Goal: Make `preg_match_impl` (and in turn `preg_match` and `preg_match_all`) return darrays and varrays instead of PHP arrays so they can convert to dicts and vecs in the Hack array migration.
Started by changing instances of `Array::Create()` to `Array::CreateDArray()`. Changed the function `force_to_output` to call `forceToDArray`. `forceToDArray` already exists, but I added a version that (I think) works with typed values.
Added tests (mostly slightly modified from existing tests, with `_2` appended to filenames) with the flag `HackArrDVArrs` on to check that DArrays and VArrays get converted to dicts and vecs properly.
Changed `forceToDArray` to call `forceToDict` when the `HackArrDVArrs` is on -- It turns out we need to do this explicitly.
Changed `add_offset_pair` to create a varray instead of a PHP array.
Reviewed By: ricklavoie
Differential Revision:
D8742566
fbshipit-source-id:
67c930244cdac60e64fed667211939208c57f5ab