Commit Graph

188 Commits

Author SHA1 Message Date
Anatol Belski
b8324e6d63 further fixes to ext/standard 2014-08-18 16:50:54 +02:00
Anatol Belski
f2182ab845 some more pure naming replacements 2014-08-17 21:16:27 +02:00
Anatol Belski
b7e7a89541 several fixes -
- param parsing Z_PARAM_STR vs Z_PARAM_STRING
- some functions for new params
- etc
2014-08-16 12:55:13 +02:00
Anatol Belski
cb25136f4e fix macros in the 5 basic extensions 2014-08-16 11:37:14 +02:00
Dmitry Stogov
7497c8793d Merge branch 'master' into phpng
* master: (51 commits)
  Update Git rules
  Back to -dev (with EOL notice in NEWS)
  new NEWS block for the next release
  It's 2014 already, fix copyright year where user visible
  PHP 5.3.29
  Some changes were lost in the merge commit of #66091
  Updated NEWS for #66091
  Fixed #66091
  Updated NEWS for #66091
  Updated NEWS for #66091
  Fixed #66091
  updated NEWS
  updated NEWS
  updated NEWS
  backported the fix for bug #41577
  NEWS entry for e6d93a1 / d73d44c
  restore FPM compatibility with mod_fastcgi broken since #694 / 67541, fixes bug 67606
  Revert "Merge branch 'pull-request/694' into PHP-5.6"
  PHP 5.3.29RC1
  Fix missing type checks in various functions
  ...

Conflicts:
	ext/date/php_date.c
	ext/standard/math.c
2014-08-14 23:30:49 +04:00
Sara Golemon
37e91cc5d3 Merge branch 'pull-request/658' 2014-08-14 09:44:14 -07:00
Dmitry Stogov
4c716e8b51 Merge branch 'master' into test
* master: (39 commits)
  Add __debugInfo() to UPGRADING.
  fix TS build
  Update NEWS
  Update NEWS
  Update NEWS
  Small tidy ups and raise visibility of GitHub PR process
  Bug #41631: Observe socket read timeouts in SSL streams
  wrap int8_t and int16_t with #ifdef to avoid possible clashes
  - Updated to version 2014.6 (2014f)
  Removed Countable::count() change info from UPGRADE.INTERNALS too
  NEWS and UPGRADING for intdiv()
  Revert "Add SO_REUSEPORT + SO_BROADCAST support via socket stream context option"
  Fixed skip case for intdiv 64-bit test
  Use callback structure
  Add EXPECTF
  Fix handling of multi-result sets with PS...used to clean not only the result set but the whole PS.
  5.5.17 now
  5.4.33-dev now
  Add SO_REUSEPORT + SO_BROADCAST support via socket stream context option
  Add SO_REUSEPORT + SO_BROADCAST support via socket stream context option
  ...

Conflicts:
	ext/fileinfo/libmagic/softmagic.c
	main/streams/xp_socket.c
2014-08-11 11:38:41 +04:00
Andrea Faulds
7148a4cf03 Added -1 safety check, fixed test 2014-07-15 13:53:24 +01:00
Andrea Faulds
6692d15e26 php_error_docref 2014-07-15 13:48:55 +01:00
Andrea Faulds
a521fe51d3 Implemented intdiv() 2014-07-15 00:35:26 +01:00
Dmitry Stogov
27f38798a1 Fast parameter parsing API
This API is experemental. It may be changed or removed.
It should be used only for really often used functions.
(Keep the original parsing code and wrap usage with #ifndef FAST_ZPP)
2014-07-11 16:32:20 +04:00
Xinchen Hui
b1c9d5ddee Use strpprintf 2014-05-10 00:43:02 +08:00
Marc Bennewitz
b547e1358d Improved logarithm of base 2 and 10 of standard math functions 2014-04-28 19:58:10 +02:00
Nikita Popov
dd419d24ca Replace more convert_to_* calls 2014-04-25 23:21:05 +02:00
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Nikita Popov
20f2e5986e Fix ZTS build
This only makes it compile, it doesn't actually work, presumably
because interned strings are assumed in some places.
2014-04-09 23:41:16 +02:00
Xinchen Hui
a1052c51f8 Fixed wrong fix for tmpbuf 2014-03-06 19:22:59 +08:00
Xinchen Hui
be4878edd0 Use stack memory here to avoid mem leak 2014-03-03 16:39:29 +08:00
Dmitry Stogov
40e053e7f3 Use better data structures (incomplete) 2014-02-13 17:54:23 +04: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
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Veres Lajos
144eab0889 code related typo fixes 2013-08-18 13:46:32 -07:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Reeze Xia
b47d6b32ba Fix test fails: ext/standard/tests/general_functions/bug27678.phpt
After commit 3e62aae1, number_format() returns string with length,
but _php_math_number_format_ex_len() didn't set string length
on nan and inf. This cause segfault when destruct the return value.
2012-07-17 23:08:11 +02:00
Gustavo André dos Santos Lopes
3e62aae1b4 Fix bug #62112: number_format() is not binary safe
The bug report actually urges PHP 5.3's behavior to be
reinstated -- that is, make "\0", when used as a separator,
be the same as no separator at all. I believe that is not a
proper course of action and that "\0" being interpreted as
no seperator was a bug in PHP 5.3.

Using "" for no separator, in both 5.3 and 5.4, before and
after this change, causes no separator to be used, so
there is no functionality loss.
2012-05-23 11:37:27 +02:00
Nuno Lopes
8b4b70df56 fix stack overflow in php_intlog10abs()
bug uncovered by LLVM/clang's new -fbounds-checking switch
this patch fixes a crash in ext/standard/tests/math/round_large_exp.phpt
2012-05-11 13:07:21 -04:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Gustavo André dos Santos Lopes
8d52500d41 - Reverted r301991, which is a (partial) fix to bug #52550, addressing an
overflow in a signed subtraction. This fixes the overflow without
  changing the algorithm.
2011-06-12 00:56:18 +00:00
Stanislav Malyshev
c16bfe403f MFH: Fixed comilation on x86_64 2011-05-27 19:24:09 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Adam Harvey
d2263d482d Implement FR #53457 (number_format must support more than one character for
thousands separator).
2010-12-03 10:10:08 +00:00
Ilia Alshanetsky
d9af17b839 Additional fix for bug #52550 & fix test & warning from previous fixes 2010-08-08 15:45:02 +00:00
Felipe Pena
232ae3df01 - Fix build 2010-08-06 22:21:13 +00:00
Ilia Alshanetsky
a8ddaca0b0 WS 2010-08-06 20:16:11 +00:00
Ilia Alshanetsky
34e8b615ed Another fix for issue indentified in bug #52550 2010-08-06 20:04:29 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Dmitry Stogov
31c0af245e Fixed floating point mathematic speed degradation (Christian) 2009-03-18 10:18:10 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Christian Seiler
2e32354456 - MFH: Implemented http://wiki.php.net/rfc/rounding 2008-12-02 16:27:15 +00:00
Ilia Alshanetsky
22f3c8b05b Fixed bug #42294 (Unified solution for round() based on C99 round)
[DOC] New implementation of round() to work-around inconsistencies for win32
and 64 bit platforms.

This solution is very roughly based on BSD's implmentation of round(), which
itself is an implementation of C99 standard. We take the absolute value of number
we want to round time the 10 to the power of the number of decimal spaces we are
rounding to. The resulting value is rounded up and the pre-rounded value is
subtracted from it. If the difference is greater then 0.5000000001 we round up,
otherwise we round down.
2008-10-29 20:03:34 +00:00
Arnaud Le Blanc
d69dfa4b9f MFH: initialize optional vars 2008-10-21 22:08:38 +00:00
Matt Wilmas
01afb02bad Fix build 2008-05-08 04:23:26 +00:00
Kalle Sommer Nielsen
ed7e0c0dff * Changed php_*h() to be static
* Changed NEWS entry to be say 'native' insted of 'Windows' (ref. *h())
2008-05-06 10:55:49 +00:00
Derick Rethans
af371c9f5e - Fixed build. 2008-05-05 10:09:54 +00:00
Kalle Sommer Nielsen
f61731874a Merge PHP_5_3 - Implemented Windows support for asinh(), acosh(), atanh(), log1p() and expm1()
[DOC] Merge_5_3
2008-05-05 07:29:41 +00:00
Felipe Pena
9139e74a60 New parameter parsing [DOC] 2008-02-21 17:50:03 +00:00
Antony Dovgal
fe4e73238a ws->tab fixes 2008-02-21 11:53:34 +00:00
Zoe Slattery
5932b49990 Fixing 44092 2008-02-12 07:15:40 +00:00