263 Commits

Autor SHA1 Mensagem Data
Daniel Sloof b4845ed26d SimpleXML rewrite
Update SimpleXML to be compliant with Zend and fix a bunch of
tests.

Closes #1387
Closes #1530

Reviewed By: @ptarjan

Differential Revision: D1135882

Pulled By: @scannell
2014-01-28 15:38:21 -08:00
bsimmers fd6d3c4dd2 Disable flaky zend test
Reviewed By: @edwinsmith

Differential Revision: D1147082
2014-01-28 15:38:11 -08:00
Jim Radford c052283289 Implement stream_context_{get,set}_default
Implement stream_context_{get,set}_default

Closes #1642

Reviewed By: @ptarjan

Differential Revision: D1145658

Pulled By: @scannell
2014-01-28 09:17:56 -08:00
Paul Tarjan f30fc478c3 try these again
I want to see what contbuild has to say about them

Reviewed By: @scannell

Differential Revision: D1116576
2014-01-28 09:17:50 -08:00
Paul Tarjan b873e69600 remove assert for ::class and make it fatal instead
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
2014-01-28 09:17:47 -08:00
Simon Welsh beb5d544a5 Convert standard/url to HNI
Convert standard/url to HNI

Closes #1604

Reviewed By: @ptarjan

Differential Revision: D1135473

Pulled By: @scannell
2014-01-28 09:17:45 -08:00
Brandon Wamboldt b1090c3e04 Fix cURL tests by implementing server script
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
2014-01-28 09:17:39 -08:00
Sean Cannella b54dff5b10 Add charset= support to PDO mysql DSN
Adds support for charset= in the PDO mysql DSN.

Closes #1309
Closes #1489

Reviewed By: @ptarjan

Differential Revision: D1137883
2014-01-28 09:17:38 -08:00
Ainsley Escorce-Jones 9d28061e71 json_decode() parity with PHP 5.4
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 #1470
Closes #1496

Reviewed By: @ptarjan

Differential Revision: D1117099

Pulled By: @scannell
2014-01-28 09:17:38 -08:00
Sean Cannella 621b302b23 Revert "Implement ::class"
Reviewed By: ptarjan

This reverts commit 73975187358058e071bbfca5094bb0fc6e23ef86.
2014-01-28 09:17:37 -08:00
Paul Tarjan a94f25001c Implement ::class
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
2014-01-28 09:17:37 -08:00
bsimmers e31c664c02 Disable flaky zend test
Reviewed By: @bertmaher

Differential Revision: D1135985
2014-01-22 05:30:51 -08:00
Fred Emmott 973c5847f2 Make SQLite3::version static
Depended on by codeigniter

Reviewed By: @ptarjan

Differential Revision: D1130812
2014-01-20 10:08:24 -08:00
bsimmers 58ddd23cec Disable flaky zend test
Reviewed By: @edwinsmith

Differential Revision: D1133886
2014-01-20 10:08:17 -08:00
Emil Hesslow 7ee169a7eb New try to get in the ini parser stuff
- 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
2014-01-17 01:40:52 -08:00
Emil Hesslow 36eac72b6e Re-import ext/standard/tests/general_functions
tools/import_zend_test.py -z ~/php-src-PHP-5.5/ -o ext/standard/tests/general_functions

Reviewed By: @ptarjan

Differential Revision: D1127780
2014-01-17 01:40:52 -08:00
Emil Hesslow 91c03c40a4 A bunch of different CSV fixes
- Do a bunch of small changes to make HHVM error when Zend does

Reviewed By: @ptarjan

Differential Revision: D970379
2014-01-17 01:40:50 -08:00
Simon Welsh a464ad28e8 Convert ext/bzip2 to HNI
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
2014-01-14 11:41:27 -08:00
Sara Golemon ba8b4bf75a Implement Intl's DateFormatter class
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
2014-01-11 18:11:05 -08:00
Simon Welsh 8dfad03dfa Convert ext/bcmath to HNI
Converts ext/bcmath to HNI and adds support for scaling

Closes #1534

Reviewed By: @sgolemon

Differential Revision: D1123805

Pulled By: @scannell
2014-01-10 15:30:42 -08:00
Paul Tarjan f52716b149 stop forcing some tests to bad
Our test infra has changed so much, lets see how these do

Reviewed By: @alexmalyshev

Differential Revision: D1116573
2014-01-09 11:13:40 -08:00
Paul Tarjan 0b8bec7835 import segfaulting tests
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
2014-01-05 08:55:49 -08:00
Paul Tarjan 75922a20ca import many tests that used to hang forever
You have no idea how happy this makes me. We are down to 5 perma-hanging tests.

Reviewed By: @JoelMarcey

Differential Revision: D1116535
2014-01-05 08:55:49 -08:00
Paul Tarjan dd4ddd5ee0 re-enable ftp_chmod_basic
The other ftp tests have ben fine since I fixed the port choosing issue upstream.

Reviewed By: @jdelong

Differential Revision: D1116504
2014-01-05 08:55:48 -08:00
Jordan DeLong 8ebc0e6702 Revert "Fixes to parse_ini_(file|string)"
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
2014-01-05 08:55:47 -08:00
Brandon Wamboldt 1161d81be3 Fix preg_quote not escaping dashes
Fix preg_quote not escaping dashes

Closes #1440
Closes #1441

Reviewed By: @elgenie

Differential Revision: D1111976

Pulled By: @scannell
2014-01-02 20:04:47 -08:00
Brandon Wamboldt bf73fae1f2 Already declared constants should cause a notice
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
2014-01-02 20:03:50 -08:00
Sara Golemon 39416ccbdc Run a double-quoted json scalar string through the parser
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
2013-12-30 12:05:06 -08:00
Simon Welsh aba50a36f4 Add Array to string conversion notice
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
2013-12-30 12:04:52 -08:00
Brandon Wamboldt d26429c53d Fix preg_match_all requiring three parameters
preg_match_all's third parameter ($matches) should be an optional parameter.

Closes #1451

Reviewed By: @alexmalyshev

Differential Revision: D1112209

Pulled By: @scannell
2013-12-30 12:04:49 -08:00
Alex Malyshev ae9c577e7f Actually implement imagefilter()
imagefilter was using a function table filled with functions that just
threw NotSupportedException. Fixed them.

Reviewed By: @elgenie

Differential Revision: D1111814
2013-12-28 17:35:12 -08:00
reeze 4e697550da Fix ReflectionClass::implementsInterface with \
Fixed ReflectionClass::implementsInterface() with black slash
prefixed interface name

Closes #1424
Closes #1430

Reviewed By: @ptarjan

Differential Revision: D1110811

Pulled By: @scannell
2013-12-26 11:01:51 -08:00
Patryk Pomykalski 7a7b09894a Fixed setIteratorMode() in SplStack and SplQueue
setIteratorMode in SplStack didn't throw exception when mode
was invalid.

Closes #1426

Reviewed By: @alexmalyshev

Differential Revision: D1110182

Pulled By: @scannell
2013-12-26 11:01:41 -08:00
Brandon DuRette 365c56fdc4 Make strrchr more compatible with Zend
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
2013-12-26 11:01:38 -08:00
Simon Welsh 08395de8ca fix ob_get_contents return value
ob_get_contents returns false if not currently buffering output

Closes #1429

Reviewed By: @alexmalyshev

Differential Revision: D1110757

Pulled By: @scannell
2013-12-26 11:01:20 -08:00
Paul Tarjan 39b21a2fd7 filter_var snapshot (take 2)
Unrevert the filter_var diff. Also fix a bug where it isn't snapshotted in the request path.

Reviewed By: @JoelMarcey

Differential Revision: D1104270
2013-12-24 14:10:54 -08:00
Brandon DuRette 65bdcabe8e str_replace counts fail to accumulate with arrays
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
2013-12-24 14:10:53 -08:00
Pedro Eugenio Rocha Pedreira 8a0e601bf4 hhvm: initial implementation of the php_odbc API
Reviewed By: @ptarjan

Differential Revision: D1058022
2013-12-24 14:10:36 -08:00
Sara Golemon 8525d97318 Add hash_copy()
Missing piece of hash API

Reviewed By: @ptarjan

Differential Revision: D1104737
2013-12-19 12:11:42 -08:00
bsimmers ed492718fd Disable flaky zend test
Reviewed By: @jdelong

Differential Revision: D1103516
2013-12-18 11:41:36 -08:00
bsimmers 87c71e05a2 Revert "make filter_var snapshot the variables at request start"
This reverts commit de0579e00c94928357588ceb2796294be9110178. It broke
test/quick/debugger/flow.php

Reviewed By: @ptarjan
2013-12-18 11:41:32 -08:00
Paul Tarjan 9ea6701165 make filter_var snapshot the variables at request start
I made an extensible way for extensions to run some code at the start of every request.

Reviewed By: @alexmalyshev

Differential Revision: D1101191
2013-12-18 11:41:10 -08:00
bsimmers ac954c4d74 Disable flaky zend test
Reviewed By: @bertmaher

Differential Revision: D1100222
2013-12-16 13:03:04 -08:00
Emil Hesslow c8001cc9ed Fixes to parse_ini_(file|string)
Do a bunch of fixes in the parse_ini lexer and parser

Closes: #1320
Closes: #825
Closes: #838

Reviewed By: @ptarjan

Differential Revision: D970513
2013-12-16 13:03:01 -08:00
bsimmers 29d0171824 Disable flaky zend test
Reviewed By: @jdelong

Differential Revision: D1099379
2013-12-16 13:02:31 -08:00
Sara Golemon 03e0826d77 Add ICU's IntlTimeZone and IntlIterator classes
Per zend implementation

Reviewed By: @ptarjan

Differential Revision: D1085605
2013-12-13 12:39:28 -08:00
Paul Tarjan 6e2310dfd7 import skipif sections from zend tests
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
2013-12-13 12:39:06 -08:00
Paul Tarjan 3c97357707 blacklist bug36999
Broken on travis witha  SoapFault which I know nothing about.

Reviewed By: @scannell

Differential Revision: D1093510
2013-12-13 11:20:54 -08:00
Paul Tarjan 00ca68a715 import libgd from zend
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
2013-12-12 20:03:27 -08:00
Paul Tarjan 050c081b0e make rename_variation parallelizaable
Reviewed By: @JoelMarcey

Differential Revision: D1091010
2013-12-10 17:39:34 -08:00