Commit Graph

1920 Commits

Author SHA1 Message Date
Rasmus Lerdorf
229d207a58 Split CRC32 table out into a header file so other code can use it 2002-02-20 18:18:39 +00:00
Jason Greene
150d339231 Renamed zval_debug_dump() to debug_zval_dump() 2002-02-10 17:38:15 +00:00
Jason Greene
91ac18bc66 @Added zval_debug_dump which works similar to var_dump yet displays extra
internal information such as refcounts, and the true type names (Jason)
2002-02-10 06:52:35 +00:00
Andi Gutmans
284eaf34cc - Add TSRMLS_FETCH()'s needed for the new object overloading in ZE2. 2002-02-05 20:43:49 +00:00
Andrei Zmievski
441c583a2c Converted extract() to use smart_str for variable name manipulation. This
sped it up a bit.
2002-02-01 20:17:32 +00:00
Derick Rethans
98e8a7ba08 - Fix for bug 15311 (type mismatch of php_dl when #ifndef HAVE_LIBDL) 2002-01-31 10:21:24 +00:00
Jon Parise
9aba9071b6 These are now defined in zend_config.w32.h. 2002-01-28 16:06:27 +00:00
Jon Parise
e40e7a669a zend_isinf() is already defined in Zend/zend_config.w32.h for Win32. 2002-01-27 18:19:18 +00:00
Jon Parise
f174bbc711 Use the zend_* versions of finite(), isinf(), and isnan(), as defined
in php_config.h.  Redefine the zend_* versions in the case of Win32.

This fixes the build on systems that don't provide a native version of,
say, isinf() (e.g. Solaris).
2002-01-27 07:41:20 +00:00
Jon Parise
d299bdc5d9 Add a comment indicating that this return statement will never be reached.
# Perhaps it should just be removed?
2002-01-27 07:15:07 +00:00
Sterling Hughes
0d59ff42d4 don't throw fatal errors, throw E_WARNING instead. 2002-01-27 06:18:05 +00:00
Derick Rethans
33b66a224b - Fixed highlight_* (make it more robust)
#- Thx Mr S for noticing this.
2002-01-25 15:43:58 +00:00
Derick Rethans
96a9eba020 - Added optional parameter to highlight_string and highlight_file which
makes these functions return a highlighted string instead of dumping
  to standard output. (Derick)
@- Added optional parameter to highlight_string and highlight_file which
@  makes these functions return a highlighted string instead of dumping
@  to standard output. (Derick)
2002-01-25 11:27:47 +00:00
Rasmus Lerdorf
0d139d3c27 (extraxt) add EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS flags
@- Added EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS flags to extract()
@   EXTR_IF_EXISTS only extracts a variable if it already exists
@   EXTR_PREFIX_IF_EXISTS only extracts the variable if it exists and
@   then it prepends the prefix to it.  ie. if $PATH exists then
@   extract($_ENV,EXTR_PREFIX_IF_EXISTS,'e') would result in $e_PATH
@  This lets you do $a = $b = $c = true; extract($_REQUEST,EXTR_IF_EXISTS);
@  and you only get the global request variables you have defined imported
@  into your symbol table.  (Rasmus)
2002-01-25 09:01:02 +00:00
Marko Karppinen
449b53e34a Ignore ordinal suffixes on numbers (bug #15210) 2002-01-24 22:24:58 +00:00
Sean Bright
a38bfb424e Fix for bug #15130. Way too much effort for this bug, but cleaned up code
a bit, use zend_parse_parameters(), etc, etc.  We only look for extensions
in the basename, not the full path.
2002-01-22 03:35:23 +00:00
Markus Fischer
fe6e7058ee - Fix crash with invalid localtime on Win32 systems. 2002-01-20 20:16:54 +00:00
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