1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00
Commit Graph

1903 Commits

Author SHA1 Message Date
Markus Fischer 1e2b854bba - mkdir(): made second (mode) parameter optional, default to 0777
switched to zend_parse_parameters().
# Added vim 'noet' setting
2002-01-11 10:44:24 +00:00
Andrei Zmievski ddc039d0f5 Fix the recursive counting, it was broken for associative or non-sequential
arrays. Also update NEWS file.
2002-01-10 21:31:06 +00:00
Sascha Schumann a1dbb4ab16 (PHP touch) Operate on a stack buffer.. no need for allocating newtime
on the heap.
2002-01-10 07:25:00 +00:00
Sascha Schumann edfd6d0988 Add three-parameter touch() which enables users to set
mtime/atime to different values.
2002-01-10 07:21:57 +00:00
jim winstead 831473d76e Rename finite/isinf/isnan to more standard is_*() names. 2002-01-09 23:59:05 +00:00
jim winstead e68095972e Move type-handling functions into ext/standard/type.c (which had
a few otherwise unused functions in it).
2002-01-09 23:47:46 +00:00
Derick Rethans aee570302f - Fix bug introduced in earlier patch 2002-01-09 16:03:36 +00:00
jim winstead 4fb4c6d4b3 More tweaking of wordwrap() with the cut parameter set. It was being a
little too aggressive and cutting words without breaking at spaces
first. (A couple of tests were incorrect.)
2002-01-05 23:49:58 +00:00
jim winstead ca15b22212 New memcpy()-based wordwrap() implementation. The simple case
(single-character break, no forced break) appears to be about 60%
faster, and there's simply no comparison for non-simple cases with
non-trivial amounts of text. The old algorithm was O(n^2) (with an
unfortunately large constant factor) because of the use of strncat(),
the new one is O(n). Added some more tests, too.
@ - Made wordwrap() significantly faster. (Jim)
# test case: $t = join('',file('ChangeLog')); $w = wordwrap($t,10,"\n",1);
# new code completes in less than a second. i'm still waiting for the
# old code to finish.
2002-01-05 20:46:43 +00:00
jim winstead 62395159a9 Fix the Win32 compile. 2002-01-05 08:29:53 +00:00
Egon Schmid 87ad1fdb3b Fixed some protos. 2002-01-05 07:54:49 +00:00
jim winstead b9d68b8e9d Apparently multi_convert_to_double_ex() didn't quite do what I
thought. Still need to handle numeric strings.
2002-01-05 03:56:38 +00:00
jim winstead 461e105069 Fixed pow(), and added finite(), isinf(), and isnan(). Also fixed
pow() tests.
@- Fixed pow(), and added finite(), isinf(), and isnan(). (Jim)
# Jeroen was on crack, and apparently flunked arithmetic. Names of new
# functions subject to change if people get persnickety about them.
# (They're currently the same as the underlying C library function
# names. Hope nobody forgets to update the tests if they change the
# names.)
# Oh, and pow() uses the new parameter-passing API now.
2002-01-05 03:45:11 +00:00
jim winstead 4b8f435b2a good grief, positive powers of 0 are well-defined. (code fix coming.) 2002-01-05 02:16:16 +00:00
jim winstead 9a171d03e8 Be more aggressive in making sure that substring matches are valid in
ereg_replace before trying to use them.
# i could have sworn i fixed this in php3. ereg() has similar logic, i
# guess i just missed ereg_replace. fixing this lets
# ext/standard/tests/reg/012.phpt pass on my debian/unstable box
2002-01-05 01:59:11 +00:00
Zak Greant 6823fb1fe7 Surprising how tests can fail when they don't have any supporting data :) Thanks for the catch Jan and Jim 2002-01-05 01:58:44 +00:00
jim winstead f68b7c5f3e Fixed segfault in wordwrap() when wrapping to zero width and using
multi-character break or trying to force cut (bug #12768, now fails
and issues a warning because forcing a zero-width cut doesn't make
sense). Also converted to new paramater-passing API and avoid making
an extra copy of the return values.
# also added tests.
@- Fixed segfault in wordwrap() when wrapping to zero width and using
@  multi-character break or trying to force cut (bug #12768). (Jim)
2002-01-04 19:48:08 +00:00
Hartmut Holzgraefe c9bc54abc3 fix for bug #14832: basename with 2nd parm corrupts source string 2002-01-03 20:20:35 +00:00
Thies C. Arntzen 21cc717bac protos fixes by Wolfgang Drews 2002-01-03 06:57:22 +00:00
Zak Greant 8c8b49ed20 Adding key_exists alias for array_key_exists, at the request of One-Who-Shall-Not-Be-Named-Because-He-Is-On-Vacation 2002-01-02 21:21:48 +00:00
Zak Greant f01745896f chdir: corrected proto, converted to zend_parse_parameters 2001-12-30 10:13:08 +00:00
Zak Greant 59a45acca6 chroot: corrected prototype, converted to zend_parse_parameters 2001-12-30 09:50:41 +00:00
Zak Greant 2f6ffb545e Converted getenv to use zend_parse_parameters 2001-12-30 09:36:24 +00:00
Derick Rethans 57f3c395b8 - Removed is_array_multidimensional 2001-12-29 22:59:40 +00:00
Derick Rethans ae07e93028 - Added test for recursive counting 2001-12-29 21:05:03 +00:00
Derick Rethans cef0a461f9 - Added extra parameter to count() that recursively counts elements in an
array and added is_array_multidimensional(). (patch by Vlad Bosinceanu
  <glipy@fx.ro>)
2001-12-29 20:59:59 +00:00
Andi Gutmans 211d712c59 @ Fix bug in krsort() where an extra character was being compared (Andi)
- Fix bug in krsort() where an extra character was being compared (Andi)
2001-12-29 20:47:25 +00:00
Sebastian Bergmann 9063a96dfa PHP 4.0 -> PHP 4. Patch by Martin Jansen <mail@martin-jansen.de>. 2001-12-29 14:23:58 +00:00
Dan Kalowsky b76eb3ae40 Making PHP compile again on MacOSX 10.1
# 10.1 does not have inet_pton support yet it seems so disabling it.
2001-12-27 15:42:05 +00:00
Markus Fischer 7cf14fb1e1 - Fix tiny leak. 2001-12-23 15:56:41 +00:00
Alex Waugh e320de1e2e Undefine AF_UNIX under RISC OS 2001-12-23 00:46:13 +00:00
Derick Rethans e8f3e3ffa0 - Let ceil also return a float in every case 2001-12-22 11:53:29 +00:00
Derick Rethans 6729156450 - Add test for floor and ceil 2001-12-22 11:52:56 +00:00
Zak Greant 2c9f5d8a91 Modified array_walk, arsort, asort, krsort, ksort, rsort, shuffle, sort,
uasort, uksort and usort.

Corrected prototype comments for all.

Converted to use zend_parse_parameters, except for the u.?sort functions.

Changed return values for failure from implicit NULL to explicit FALSE in
asort(), krsort(), and ksort().

Changed pval to zval in the u.?sort functions.

Added test to help ensure that fixes to code do not change function
behavior. Tests are quite large (~237k) but compress down to ~16k.
Please let me know if this is a problem!
2001-12-22 11:49:56 +00:00
Zeev Suraski 431c793e0c Fix a warning 2001-12-22 03:04:32 +00:00
Derick Rethans ca1bcd9ac3 - Fix for bug #14646, floor() always returns a float now. 2001-12-21 16:38:49 +00:00
Derick Rethans e5c08b815f - Added open basedir checks to file functions. (Patch by
Christoph Kassen <chkassen@chkassen.de>)
2001-12-21 08:04:21 +00:00
Sean Bright 25058db066 Use memset() instead. 2001-12-21 03:50:07 +00:00
Sean Bright 33730ca2b9 Initialize variable to avoid bogus data and possible segfault. 2001-12-21 03:10:11 +00:00
Sean Bright 0ca4f69d31 Switched some functions to use zend_parse_parameters, cleaned up some
unused variables and some whitespace work.
2001-12-21 01:53:25 +00:00
Derick Rethans d578e05f96 Mail should go to php-dev 2001-12-16 13:04:02 +00:00
Derick Rethans 3709eb6ab2 - Fix for bug #14544, bogus warning in pow()
#- I think I do not need to tell who screwed this up....
2001-12-16 10:59:20 +00:00
Hartmut Holzgraefe 424679e9fb proto fixes 2001-12-16 10:18:45 +00:00
Derick Rethans f5f4a5cf37 - TSRMLS here and there, it's all about the Windows flair 2001-12-15 14:55:18 +00:00
Derick Rethans 143df7de6b - Added a second parameter to var_export which makes the function return
the variable representation in a string.
2001-12-15 14:45:59 +00:00
Stig Bakken dd969337a0 return boolean where appropriate 2001-12-12 01:36:07 +00:00
Hartmut Holzgraefe cc4b274a58 ereg functions will now take in account the real number of
subexpressions instead of simply assuming a fixed count of 10
2001-12-11 19:28:31 +00:00
Sebastian Bergmann 38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Derick Rethans a7b9d5590b - Remove debug code 2001-12-08 23:46:19 +00:00
Derick Rethans 3cb1db985e - Added var_export, which shows a representation of a variable, much like
var_dump, but in such a way you can use it as PHP code.
@- Added var_export, which shows a representation of a variable, much like
@  var_dump, but in such a way you can use it as PHP code. (Derick)
2001-12-08 23:44:34 +00:00