Commit Graph

2722 Commits

Author SHA1 Message Date
Bob Weinand
363ff60475 Fixed memory leak in pow operator 2014-02-06 21:31:40 +01:00
datibbaw
aff56f3c45 add T_POW (**) operator
Fixed recognition of the operator

Added opcode, still doing multiply instead of pow()

opcode now always returns int(42)

The right answer, but always a float

Yanked code from pow() implementation.

Should not handle negative long as exponent ourselves

Added test cases from pow()

Moved precedence higher than '~'

Added GMP operator overloading

Added ZEND_ASSIGN_POW (**=) operator.

Added pow() as a language construct.

Adjusted test cases for changed precedence.

Reduced pow() to shell function around ZEND_API pow_function()

Reduced test case to only contain edge cases
Added overloading test case

Moved unary minus above T_POW

Revert "Added pow() as a language construct."

Bad bad bad idea.

This reverts commit f60b98cf7a8371233d800a6faa286ddba4432d02.

Reverted unary minus behaviour due to previous revert.
Convert arrays to int(0)
Exponent with array as a base becomes int(0)

Rebase against master

Fixed tokenizer test case
2014-02-06 14:41:21 +01:00
Stanislav Malyshev
2fac5e5669 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  drop precision since trigonometric functions are non-portable
2014-01-26 15:15:50 -08:00
Stanislav Malyshev
1dcaa109a1 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  drop precision since trigonometric functions are non-portable
2014-01-26 15:15:38 -08:00
Stanislav Malyshev
35cb180d9e drop precision since trigonometric functions are non-portable
See: http://stackoverflow.com/questions/21212326/floating-point-arithmetic-and-reproducibility
2014-01-26 15:14:16 -08:00
Will Fitch
a540c57331 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #66509: copy() arginfo incorrect since 5.4
2014-01-18 11:56:22 -05:00
Will Fitch
767e6d2e08 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #66509: copy() arginfo incorrect since 5.4

Conflicts:
	NEWS
2014-01-18 11:39:32 -05:00
Will Fitch
5b906ce6eb Fix bug #66509: copy() arginfo incorrect since 5.4
Since 5.4, the ZEND_BEGIN_ARG_INFO_EX was replaced
by non _EX, causing Reflection to assume the
$context parameter is required.
2014-01-18 11:25:53 -05:00
Anatol Belski
61e1f79585 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  one more extension for the basename test
2014-01-05 19:21:49 +01:00
Anatol Belski
748e707bf9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  one more extension for the basename test
2014-01-05 19:21:27 +01:00
Anatol Belski
1c586d4070 one more extension for the basename test 2014-01-05 19:19:54 +01:00
Anatol Belski
e5dd5d0ad4 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  improved the fix for bug #66395
  updated NEWS
  Fixed bug #66009 Failed compilation of PHP extension with C++ std library using VS 2012
2014-01-05 19:13:15 +01:00
Anatol Belski
3bde9cfd8d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  improved the fix for bug #66395
2014-01-05 19:12:52 +01:00
Anatol Belski
3f7f72adb2 improved the fix for bug #66395
- fixed the traverse vulnerability in case like c:d:file.txt
- ensure paths containing NTFS streams are still worky
2014-01-05 19:05:04 +01:00
Anatol Belski
f0100261e1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #66395 basename function doesn't remove drive letter
2014-01-03 22:38:47 +01:00
Anatol Belski
d3a053d9f4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #66395 basename function doesn't remove drive letter
2014-01-03 22:32:39 +01:00
Anatol Belski
46f60fae22 Fixed bug #66395 basename function doesn't remove drive letter 2014-01-03 22:25:58 +01:00
Xinchen Hui
5eb8d9d700 Merge branch 'PHP-5.6' of https://git.php.net/push/php-src into PHP-5.6 2013-12-15 16:55:29 +08:00
Eric Stenson
330168a247 Fix tests expecting specific resource IDs
When Wincache or APC are installed, the resource IDs are not the same.
This is because Wincache takes a few resource objects for itself.  As a
result, these tests become false positives.

On Windows boxes, the microtime precision is not granular enough
to reliably register a difference if two calls to uniqid() are made
concurrently.  This is a fix to the uniqid() test to avoid the false
positive when run on Windows machines.  Also, added a test to exercise
the 'more_entropy' variant of uniqid().
2013-12-15 16:51:21 +08:00
Sara Golemon
f0248bdce5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Use 'user@example.com' rather than 'user@company.com' in tests
2013-12-04 07:50:45 -08:00
Sara Golemon
32a4cc8353 Use 'user@example.com' rather than 'user@company.com' in tests
Using some arbitrary 3rd party's domain name is clowny,
even if it never tries to send.
2013-12-04 07:49:16 -08:00
Dmitry Stogov
0f39089384 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed tests
2013-12-02 12:05:29 +04:00
Dmitry Stogov
2f5ab04c5f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed tests
2013-12-02 12:04:07 +04:00
Dmitry Stogov
edbefd1d5c Fixed tests 2013-12-02 11:53:35 +04:00
Anatol Belski
696d286911 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fixed test
  And here is the real fix for #66124
  Fix for Bug #66124 (mysqli under mysqlnd loses precision when bind_param with 'i')
2013-11-21 21:29:35 +01:00
Anatol Belski
ad5a63e8bc Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fixed test
2013-11-21 21:29:02 +01:00
Anatol Belski
345032946c fixed test 2013-11-21 21:24:47 +01:00
Yasuo Ohgaki
bf91f101a6 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  added a test to cover distinction between boolean return value of unserialize function and deserializing serialized boolean
2013-11-20 07:25:04 +09:00
Yasuo Ohgaki
b8b92bd790 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  added a test to cover distinction between boolean return value of unserialize function and deserializing serialized boolean
2013-11-20 07:23:54 +09:00
Yasuo Ohgaki
0d558afc05 Fix WS in serialization_error_002.phpt 2013-11-20 07:17:53 +09:00
Aaron Hamid
050dd59c63 added a test to cover distinction between boolean return value of unserialize function and deserializing serialized boolean 2013-11-20 07:14:53 +09:00
Jeff Welch
72a8489a12 Fixed tests that fail with non-default serialize_precision configurations.
See:

 * https://bugs.php.net/bug.php?id=64760
 * 4dc4302
2013-11-20 06:17:34 +09:00
Jeff Welch
101c780500 Fixed tests that fail with non-default serialize_precision configurations.
See:

 * https://bugs.php.net/bug.php?id=64760
 * 4dc4302
2013-11-20 06:17:23 +09:00
Jeff Welch
b4210efe76 Fixed tests that fail with non-default serialize_precision configurations.
See:

 * https://bugs.php.net/bug.php?id=64760
 * 4dc4302
2013-11-20 06:14:32 +09:00
Xinchen Hui
140a42f779 Merge branch 'PHP-5.5' into PHP-5.6 2013-11-17 17:20:13 +08:00
Xinchen Hui
de79c51555 Merge branch 'PHP-5.4' into PHP-5.5 2013-11-17 17:05:04 +08:00
Xinchen Hui
823e330c75 Fixed Bug #66094 (unregister_tick_function tries to cast a Closure to a string) 2013-11-17 17:04:37 +08:00
Remi Collet
74ab30e216 fix merge 2013-11-13 13:21:12 +01:00
Remi Collet
018b9445da Fix failed test with recent glibc
In recent version of strptime glibc upstream has fixed a discrepancy between
documentation and actual behaviour by skipping over the sequence that would match %Z.
See ddc7e412ab

So when %Z is used in format
glibc <= 2.18 returns the GMT as unparsed
glibc >= 2.19 returns empty string

Removing %Z from tested format gives the same behavior with all version.
2013-11-13 13:19:10 +01:00
Nikita Popov
dc4bf922d9 Allow $num=0 in array_fill()
Implemented request #49824.
2013-11-12 22:02:51 +01:00
Dmitry Stogov
4e6a0bd5a9 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Added tests for PHAR/OPCahce incompatibilities
  Update NEWS
  Fixed bug #65947 (basename is no more working after fgetcsv in certain situation)
  Update NEWS
  Fixed Bug #66043 (Segfault calling bind_param() on mysqli)
  NEWS entry
  NEWS entry

Conflicts:
	NEWS
2013-11-08 14:15:41 +04:00
Xinchen Hui
5f17c4d08e Merge branch 'PHP-5.4' into PHP-5.5 2013-11-08 15:33:27 +08:00
Xinchen Hui
cf2626f10c Fixed bug #65947 (basename is no more working after fgetcsv in certain situation)
previous codes: "#define php_mblen(ptr, len) ((ptr) == NULL ? mbsinit(&BG(mblen_state)):
(int)mbrlen(ptr, len, &BG(mblen_state)))#

it use mbsinit there, seems try to initialize the mblen_state, but:
"This function does not change the state identified by ps. Typical ways
to make the state pointed by ps an initial state are:

memset (ps,0,sizeof(*ps));  // ps points to zero-valued object
"
http://www.cplusplus.com/reference/cwchar/mbsinit/?kw=mbsinit
2013-11-08 15:32:28 +08:00
Ferenc Kovacs
91108818e1 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	ext/spl/tests/SplFileObject_rewind_error001.phpt
2013-11-06 10:46:34 +01:00
Sara Golemon
8b6b39fdcf Add a couple more test cases to parse_url() tests
http://::# (valid but silly)
http://#   (invalid)
2013-11-06 10:32:11 +01:00
ptarjan
290becb1f1 fix missing change from 'tcp_socket' to the more common 'server' 2013-11-06 10:32:00 +01:00
ptarjan
9c1e1bbc05 fix many parallel test issues
While running these on HHVM I've run into a lot of parallelism issues.
I'm backporting all the fixes I had to do in
https://github.com/facebook/hiphop-php/blob/master/hphp/tools/import_zend_test.py#L650
to php core.

Most of these changes were just filenames that were shared between
tests, but I did more surgery on the fixed ports. I can apreciate port
31337 as much as the next nerd, but random ports are better for tests.
2013-11-06 10:31:47 +01:00
Sherif Ramadan
98c9e56ef0 Merge branch 'pull-request/287'
Add ability to use array keys with array_filter().
This adds a third (optional) argument to array_filter() that will determine
what gets passed to the callback, the array key, value or both.
The third argument can be one of two constants: ARRAY_FILTER_USE_BOTH or,
ARRAY_FILTER_USE_KEY.
2013-10-30 09:36:19 -04:00
Yasuo Ohgaki
416f8fce5c Implemented Change crypt() behavior w/o salt RFC 2013-10-29 18:53:45 +09:00
Yasuo Ohgaki
3cf2682083 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed Bug 64760 var_export() does not use full precision for floating-point numbers
2013-10-29 17:30:58 +09:00