Update SimpleXML to be compliant with Zend and fix a bunch of
tests.
Closes#1387Closes#1530
Reviewed By: @ptarjan
Differential Revision: D1135882
Pulled By: @scannell
If you do `parent::class` in a pseudomain you end up in this case. Zend gives this message in that case
Reviewed By: @elgenie
Differential Revision: D1140116
Many cURL extension tests require an HTTP server to be running
with a specific PHP file available.
Travis will now run this script using the built-in HHVM web server.
I've add skip files so if the user doesn't have the required environment
variable set it will skip the tests, just like PHP does.
Closes#1487
Reviewed By: @ptarjan
Differential Revision: D1117179
Pulled By: @scannell
Added depth as the optional third parameter, there is now no
fixed maximum depth for the JSON parser, default depth is still 512, if
a user specifies a larger depth limit then the various stacks are
resized.
JSON_BIGINT_AS_STRING is now supported alongside the FB collection
options.
Closes#1470Closes#1496
Reviewed By: @ptarjan
Differential Revision: D1117099
Pulled By: @scannell
Done mostly in the parser. There was one weird thing, traits have `self::CLASS` refer to themselves instead of the class that uses them. I had to do runtime support for `parent::CLASS` and `static::CLASS`.
Closes#1096
Reviewed By: @elgenie
Differential Revision: D1129169
- This rerevert D1116195 and D1116199
- It also fixes a problem when ini files contains junk. So instead of outputing junk on stdout it now fails parsing those files
- I also went re-run a bunch of tests that now passes.
Reviewed By: @ptarjan
Differential Revision: D1127923
Adds error handling to the bzerr*() functions, allowing one of
the current bad tests to pass.
Closes#1547
Reviewed By: @sgolemon
Differential Revision: D1125459
Pulled By: @scannell
This is actually a partial implementation because DateFormatter
is tightly bound to IntlCalendar (and its children).
Rather than make a massive hard-to-review diff,
I've implemented most of the DateFormater bits here
and will finish them off with a followup IntlCalendar diff.
Reviewed By: @ptarjan
Differential Revision: D1119360
The test runner is now much more resiliant than it used to be, so it can endure a segfault or two. Having the tests is better than not.
Reviewed By: @jdelong
Differential Revision: D1116517
This reverts commit 0d694bcf6c0fa7aa4c15f166d0732ea37c5566d8.
It's causing parse_ini_string to sometimes hit assertions in
StringData::setSize, and behavior issues on the intern tier. The fix
wasn't completely obvious and there's an open diff relating to
relevant cases (escaped double quotes), so let's just revert until it
can be looked at by emil.
Reviewed By: @markw65
Differential Revision: D1116199
Zend will throw a PHP Notice if you try to re-declare a
constant that has already been declared, but HipHop was throwing a PHP
Warning.
Closes#1456
Reviewed By: @jdelong
Differential Revision: D1112973
Pulled By: @scannell
The non-JSON fallback for quoted string values
should still respect JSON string encoding rules like
unicode, and printf-style escape sequences.
Reviewed By: @scannell
Differential Revision: D1112801
Add Array to string conversion notice (and RaiseNotice IR
instruction needed to do so when using the JIT)
Closes#1314
Reviewed By: @alexmalyshev
Differential Revision: D1080985
Pulled By: @scannell
preg_match_all's third parameter ($matches) should be an optional parameter.
Closes#1451
Reviewed By: @alexmalyshev
Differential Revision: D1112209
Pulled By: @scannell
imagefilter was using a function table filled with functions that just
threw NotSupportedException. Fixed them.
Reviewed By: @elgenie
Differential Revision: D1111814
The contract for strrchr is "If needle contains more than one character,
only the first is used". The implementation was using strrpos which
scans for the entire string, not just the first character, resulting in
an incompatibility. This PR request resolves that incompatibility.
Also, for the purposes of strrchr, zend treats the empty string as a NUL
character. This happens because the empty string is (apparently) handled
by the second rule for needle: "If needle is not a string, it is
converted to an integer and applied as the ordinal value of a
character."
Closes#1394
Reviewed By: @JoelMarcey
Differential Revision: D1108545
Pulled By: @scannell
The $count parameter of str_replace is supposed to return the total
number of string replacements performed. This was only working correctly
when both $search and $subject were strings. When either or both are
arrays, the counts need to accumulate across all replacements. The code,
as written, was only returning the replacement count for the last pair
of values.
Closes#1383
Reviewed By: @ptarjan
Differential Revision: D1106935
Pulled By: @scannell
We've been working around various issues (the win32 tests, many of the blacklists) where the tests were actually telling us in what cases they shouldn't be run.
Very few tests actually pass now but I think this is the right thing to do
Reviewed By: @alexmalyshev
Differential Revision: D983880
I tried puling in the real `libgd` but it turns out php-src forked the library pretty hard and didn't contribute back. Instead I'll just pull in their fork.
This is a straight copy and then I fixed all the stupid C -> C++ stuff and wrote the `php_compat.h` to shim.
Reviewed By: @alexmalyshev
Differential Revision: D1083759