Derick Rethans
b5a0fd24a1
- Fix the fix.. no need to escape " in single quotes
2002-02-24 14:07:10 +00:00
Derick Rethans
a4946ca375
- Add slashes around string output
2002-02-24 13:26:43 +00:00
Yasuo Ohgaki
15daf99288
Added fmod() function
...
# Is there any reason that math.c does not use errno?
2002-02-21 11:44:41 +00:00
Andrei Zmievski
513e598d1e
Adding object aggregation capability along with tests.
2002-02-21 03:32:42 +00:00
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
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
Sterling Hughes
d95a4e2c19
Fix long2ip's handling of unsigned longs, by accepting a string argument and
...
then manually converting the string to an unsigned long using strtoul()
2001-12-07 13:20:18 +00:00
Egon Schmid
9f456af68b
Fixed some protos.
2001-12-07 09:34:50 +00:00
Hartmut Holzgraefe
94737d086f
proto fix
2001-12-07 07:27:00 +00:00
Hartmut Holzgraefe
49cc65cdae
renamed rot13 to str_rot13()
2001-12-06 21:39:01 +00:00
Hartmut Holzgraefe
71028d46cf
ported rot13() from php3
2001-12-06 19:02:27 +00:00
Hartmut Holzgraefe
c1626365f9
proto fixes
2001-12-06 18:59:22 +00:00
Hartmut Holzgraefe
38472b48d7
proto fix
2001-12-06 17:15:59 +00:00
Sterling Hughes
84ed9d387f
use PHP_INFO_ALL and PHP_CREDITS_ALL instead of hardcoding them
2001-12-06 13:31:34 +00:00
Sascha Schumann
ab38ad27a5
increase timestamp, because make tries to regenerate this file without any reason
2001-12-05 21:45:33 +00:00
Sterling Hughes
886ad91adf
Make the length parameter to fgets optional (defaults to 1024)
2001-12-04 19:40:48 +00:00
Derick Rethans
1f14640b3e
- Added ob_get_level, which returns the nesting level of the output buffering
...
mechanism. (patch by Yasuo Ohgaki <yasuo_ohgaki@yahoo.com>)
@- Added ob_get_level, which returns the nesting level of the output buffering
@ mechanism. (Yasuo, Derick)
2001-12-03 07:43:53 +00:00
Frank M. Kromann
03b5cb6775
Make php_reg_replace available from shared extensions
2001-12-03 05:15:29 +00:00
Frank M. Kromann
e7ef5041d5
Make php_MD5* functions available from shared extensions
2001-12-03 05:14:28 +00:00
Frank M. Kromann
8e40864770
Make _php_math_number_format available from shared extensions
2001-12-03 05:12:48 +00:00
Frank M. Kromann
c07cf5c2a5
Make php_startpage and php_getlastmod available from shared extensions
2001-12-03 05:11:29 +00:00
Frank M. Kromann
b4d9b70c6e
Make php_setcookie available from shared extensions
2001-12-03 05:10:10 +00:00
Hartmut Holzgraefe
34feef0d6b
- switch to new paramter parser
...
- make sure To: and Subject: do not end with a newline character
2001-12-02 17:57:17 +00:00
Bernd Roemer
99639f5812
Allow unserializer_callback_func to be turned off.
2001-12-02 17:31:11 +00:00
Derick Rethans
896faf0b34
- Fix a bug in timezones +0100 and -0100
2001-12-02 11:35:28 +00:00
Derick Rethans
29cd309944
- Fix a crash when passing e.g. NULL to basename(). (Patch by Markus
...
Fischer <mfischer@guru.josefine.at>)
#- Simplyfied code using zend_parse_parameters().
2001-12-01 15:45:55 +00:00
Thies C. Arntzen
0fd809a770
improve last patch:
...
non existant object variables are now serialized as NULL, this saves us from
buffering the serialized data.
2001-12-01 15:17:50 +00:00
Thies C. Arntzen
7ff5198c53
serialized data would be incoorect if __sleep() returned a variable-name
...
which is non-existant in the object.
submitted by: Bernd Roemer <berndr@bonn.edu>
2001-12-01 15:06:37 +00:00
Derick Rethans
9190271cef
- Added ob_flush and ob_clean functions, which do not end the buffer like
...
ob_end_flush and ob_end_clean do.
@- Added ob_flush and ob_clean functions, which flush and clean an
@ output buffer without destroying the buffer. (Derick)
2001-11-30 10:48:38 +00:00
foobar
ef64e8336f
Updated file since .re changed.
2001-11-26 22:46:15 +00:00
Derick Rethans
534b0f7e06
- Also patch the file from which var_unserializer.c is generated
2001-11-26 22:33:44 +00:00
Derick Rethans
06cdf297a8
- Adding a callback mechanism to the unserializer. (patch by Bernd
...
Roemer <berndr@bonn.edu>)
#- An explainatory e-mail will be send to php-dev
2001-11-26 21:04:21 +00:00
Derick Rethans
f17f3371be
- Added md5_file(), which calculaties the MD5 sum of a file.
...
(patch by: Alessandro Astarita <aleast@capri.it>) (Derick)
@- Added md5_file(), which calculaties the MD5 sum of a file.
@ (patch by: Alessandro Astarita <aleast@capri.it>) (Derick)
2001-11-18 18:48:17 +00:00
foobar
fc3906e93a
WS fix
2001-11-18 03:34:23 +00:00
Sascha Schumann
9f3362933a
Fix two incidents which have been reported about the new unserializer.
...
#1 : forgot to handle negative numbers
#2 : added zval_ptr_dtor which was not in the original code which
might lead to crash
PR: #14082
2001-11-16 16:34:14 +00:00
Stanislav Malyshev
39f3075500
Check in ftok() function by Andrew Sitnikov <sitnikov@infonet.ee>
2001-11-15 09:53:40 +00:00
Sterling Hughes
42b9349d8b
Many other reasons that setvbuf can fail than "wrong arguments", returning
...
false should be enough
2001-11-14 12:57:06 +00:00
Derick Rethans
b278435074
- Fix crashbug on dtor
2001-11-14 09:48:14 +00:00
Rasmus Lerdorf
55d9b2ad9c
Fix most of these tests - still think there is a bug in the long->float
...
conversion stuff somewhere
2001-11-13 13:12:46 +00:00
Rasmus Lerdorf
f78f4364a0
Different operating systems handle the group x bit differently, so
...
simplify this test to test the user x bit instead
2001-11-13 12:39:21 +00:00
foobar
12cfb76b65
Fixed the wrong logic in ini_get_all() function.
...
Now it behaves same as how phpinfo() outputs the ini entries.
If there is a local value, then the global one is the 'original one' if
there is such. Otherwise global value is same as local. :)
2001-11-13 00:37:49 +00:00
Jeroen van Wolffelaar
5ccdb1d352
Fix all (at least, I tried to catch all) proto's in file.c
2001-11-11 20:33:27 +00:00
Jeroen van Wolffelaar
788b1552a7
Add warning when set_file_buffer() fails
2001-11-11 19:42:31 +00:00
Derick Rethans
78e4644fa1
- Renaming key_exists to array_key_exists
...
@- Renamed key_exists tp array_key_exists. (Derick)
#- Not sure if this belongs in NEWS, but it was already in a released
# version. And yes, I know I'm breaking BC here, but as it was not documented
# yet, that doesn't matter.
2001-11-11 18:28:43 +00:00
Stanislav Malyshev
88c66d4859
Fix crash bug on malformed .ini file
2001-11-11 12:41:14 +00:00
Andrei Zmievski
98a7a1ba1f
Fixed bug #13901 .
2001-11-10 23:44:04 +00:00
Sascha Schumann
f341f630d3
Rewrite of unserializer which should be more maintainable and extensible.
...
Changes pass `make test´ and a couple of custom tests.
Enjoy.
2001-11-10 21:18:34 +00:00
Derick Rethans
88c6758d4e
- Fixing this bad idea
2001-11-10 18:06:28 +00:00
James Moore
4f78737000
Fix apache win32 dso build.
...
(This is untested on linux but shouldnt break anything)
2001-11-10 17:24:02 +00:00
Derick Rethans
23db803b34
- Correcting Goba's name, and adding me to QA team
2001-11-10 14:22:36 +00:00
James Moore
f111b84e05
@ - Fix Bug 9878 (patch by bfoddy@mediaone.net) (jmoore)
2001-11-07 14:22:15 +00:00
Jon Parise
2c5764d46f
It doesn't look like we use a fourth pointer.
2001-11-06 18:02:04 +00:00
Alex Waugh
f1e32a8c82
Undefine AF_UNIX when compiled for RISC OS
2001-11-04 12:40:45 +00:00
foobar
488b76b95d
ws fix
2001-11-04 02:09:55 +00:00
James Moore
a67459f581
@ - Fix bug 13885 (gmdate timezone handling on windows) (jmoore)
...
- relying on timezone and tzname isnt OK for gmdate etc, the only behaviour
that might not be right is the handling of T formatter under gmdate
should it return the machines timezone or GMT Standard Time??
2001-11-03 12:42:41 +00:00
James Moore
2ace2ccd00
WS fix
2001-11-02 19:31:57 +00:00
James Moore
c8896a38ae
@- Fix behaviour of strtok. Bug 13866 (jmoore)
...
# I have brought the behaviour of strtok into line with how the
# libc strtok's behave. currently given
# <string1><token><string2><token><token>string>
# three recursive calls to strtok returns <string1>. <string2>, <token><string3>
# it now returns <string1>, <string2>, <string3>. (there was some
# debate in #php.bugs if it should return <string1>, <string2>, false, <string3>
# but php's strtok now behaves the same way as the libc version.
2001-11-02 19:19:24 +00:00
Zeev Suraski
2f08cb119c
more ws
2001-10-29 09:45:47 +00:00
Zeev Suraski
c06c27af73
Whitespace fixes
...
Don't Adafy the code, Jani :)
2001-10-28 22:51:58 +00:00
Derick Rethans
6a5bcfef8d
- Fix for bugs #9640 and #13789
2001-10-27 17:50:26 +00:00
Andrei Zmievski
2890b57e46
@- Added array_chunk() function that splits an array into chunks of specified
...
@ size. (Andrei)
2001-10-27 05:11:15 +00:00
Andrei Zmievski
5da651fcd2
Convert to use new parameter parsing API.
2001-10-26 21:07:59 +00:00
Andrei Zmievski
b3d49ab0e4
Convert to use new parameter parsing API.
2001-10-26 14:50:58 +00:00
Rasmus Lerdorf
72fc6bc4b1
As suggested on php-dev, array_fill() is probably a better name for this
...
function.
2001-10-23 18:46:35 +00:00
foobar
f73ee14bd9
Check that realpath is available. Bug: #9469
...
# TSRM still uses it without checking. I can't fix that.
2001-10-23 11:14:51 +00:00
Zeev Suraski
c767809b2f
Prolong the death of dl() for a little while longer.
2001-10-23 01:18:54 +00:00
Rasmus Lerdorf
d98c96fc6c
Use references instead of making a copy each time in array_init(). About
...
twice as fast for a high number of elements. 2.80 seconds for the copy
of 1,000,000 elements and 1.39s for the reference version. Need to chunk
it every 62k or so because refcount is a short.
2001-10-22 20:49:27 +00:00
Jeroen van Wolffelaar
43b3da1396
Make math tests pass, round & co don't work this way, and there was an error
...
in expected output
2001-10-22 09:44:27 +00:00
foobar
701b1a548e
Fixed bug: #12617
2001-10-22 02:35:10 +00:00
Rasmus Lerdorf
4d60dbb9ef
Oops, leftover crud
2001-10-21 07:45:32 +00:00
Rasmus Lerdorf
798ec79319
Motivated by bug #13607 I wrote up a simple array_init() function that
...
lets you quickly create an array and initialize each element to a certain
value.
@ Add array_init() function (Rasmus)
2001-10-21 07:42:35 +00:00
foobar
5db38caece
Fixed bugs: #13251 , #9827 , #11363
2001-10-21 03:01:17 +00:00
Andrei Zmievski
5c90e7a78f
Fix warning,
2001-10-20 13:45:29 +00:00
Derick Rethans
6852a1e704
- Fix for bug #13413
2001-10-20 10:58:33 +00:00
Andrei Zmievski
030e873758
convert to use new parameter parsing API.
2001-10-19 19:48:35 +00:00
Andrei Zmievski
1ed249ddbc
Converting to use new parameter parsing API.
2001-10-19 19:21:58 +00:00
Egon Schmid
1f852425d1
Fixed other protos.
2001-10-19 19:21:28 +00:00
Egon Schmid
28575499df
Fixed another proto.
2001-10-19 18:42:25 +00:00
Andrei Zmievski
65da5375ea
Conver to use new parameter parsing API.
2001-10-19 18:26:30 +00:00
Edin Kadribasic
c0efc001af
Fixed last argument in strlcat() call.
2001-10-19 18:06:37 +00:00
Andrei Zmievski
8a54c2929f
Convert to use new parameter parsing API.
2001-10-19 17:16:12 +00:00
Edin Kadribasic
86959aaf62
Changed strncpy=>strlcpy; strncat=>strlcat
2001-10-19 15:54:05 +00:00
foobar
d9c26ab299
fixed proto
2001-10-16 17:08:11 +00:00
Edin Kadribasic
96a04d4ab7
Fixed bug #13083 in http_fopen_wrapper.c which is now able to handle
...
non absolute redirects.
2001-10-15 23:30:40 +00:00
Sascha Schumann
a92fa9b2bc
Either sizeof(struct stat) or sizeof f_stat, but not sizeof stat.
2001-10-13 23:43:49 +00:00
Stig Bakken
689252082c
* zend_module_entry change: apino, debug and zts are moved first,
...
see README.EXTENSIONS file for upgrade help.
@Introduced extension version numbers (Stig)
2001-10-11 23:33:59 +00:00
Stig Bakken
925ff7f2b2
* remove version_{lt,le,gt,ge,eq} functions, added a third optional
...
parameter to version_compare doing the same thing
2001-10-11 10:35:59 +00:00
Stig Bakken
f0c30a0662
* added function entries for version_{lt,le,gt,ge,eq}
2001-10-10 10:32:16 +00:00
Stig Bakken
f3d2d4c630
@Added version_{lt,le,gt,ge,eq} functions (Stig)
2001-10-10 10:14:51 +00:00
Derick Rethans
62fb3d63c5
@- Added mmapfile(), read a file into a variabele with mmap (Ilia A, Derick)
...
- Added mmapfile(), read a file into a variabele with mmap (Patch by:
Ilia A. <ilia@prohost.org>)
2001-10-07 18:34:44 +00:00
Jeroen van Wolffelaar
78b881f389
Fix naming inside php_search_array, comp_func is not a compare function.
2001-10-07 13:49:08 +00:00
Sterling Hughes
3a50a0322f
@ Have rand() and mt_rand() seed automatically if srand() or mt_srand() has
...
@ not been called. (Sterling)
2001-10-07 11:52:09 +00:00
Stig Bakken
89bd184ea0
@Added version_compare() function (Stig)
2001-10-06 23:22:37 +00:00
Derick Rethans
a0bbfb590c
- <br> -> <br />
2001-10-06 20:13:39 +00:00
Sterling Hughes
af1c7070f7
fix execution order
2001-10-06 18:59:39 +00:00
Sterling Hughes
16da751e3b
avoid TSRMLS_FETCH()
2001-10-06 18:55:09 +00:00
Sterling Hughes
1bceefb2da
@ Don't through a file does not exist warning for the is_dir(), is_writeable(),
...
@ is_readable(), is_executable(), is_link() and is_file() functions. (Sterling)
2001-10-06 18:52:37 +00:00
Edin Kadribasic
26389258bb
Made assert test pass on systems with short open tags disabled.
...
Added .cvsignore
2001-10-06 09:38:29 +00:00
Stig Bakken
9ce638248d
* prototype of version_compare, doesn't work yet
2001-10-05 23:56:19 +00:00
Jeroen van Wolffelaar
a1c2b86701
Fix the pow-test, it now succeeds on my machine
2001-10-05 23:37:08 +00:00
Jeroen van Wolffelaar
5541451085
Add test for array_search and in_array
...
(should be expanded though)
2001-10-05 22:01:04 +00:00
Jeroen van Wolffelaar
62feefddc7
Fix array_search and in_array. Now binary safe, and faster (returns when
...
found, and doesn't duplicate the key each time, but only when necessary)
Patch also by Edin Kadribasic
2001-10-05 21:58:41 +00:00
Jeroen van Wolffelaar
89ea50a588
Fix bug 13567 and don't depend on a boolean int-value to be either 1 or 0
2001-10-05 20:14:33 +00:00
Edin Kadribasic
e78b61542d
Added array_change_key_case() function that returns array with
...
with all string keys lowercased or uppercased
@- Added array_change_key_case() function that returns array with
@ with all string keys lowercased or uppercased (EdinK)
2001-10-05 18:38:53 +00:00
Derick Rethans
744d1fc1ea
- 'Fix' for bug #13543
2001-10-04 15:25:39 +00:00
Derick Rethans
be52d66f4b
- Fix crashbug in php_chunk_split()
2001-09-27 06:55:23 +00:00
Zeev Suraski
7e42c73a50
Another leak bites the dust?
2001-09-27 00:21:21 +00:00
Derick Rethans
51e2a6b84e
- nl2br now handles different styles of line endings in one string. (Patch
...
by Boian Bonev <boian@bonev.com>)
@- nl2br now handles all styles of line-endings in one string. (Boian,
@ Derick)
2001-09-26 19:34:46 +00:00
Jeroen van Wolffelaar
0916fd50c0
5th and probably/hopefully last run of conv_z_macros
2001-09-26 09:21:58 +00:00
Jeroen van Wolffelaar
6cfba2a3ea
2nd phase in back-substitution those macro's
...
I've got pretty much everything now...
2001-09-25 22:49:04 +00:00
Jeroen van Wolffelaar
c033288573
Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know.
2001-09-25 21:58:48 +00:00
Derick Rethans
f1ce7daccd
- Fix crash bug (patch by <chocolateboy@lunomail.com>)
2001-09-24 08:33:51 +00:00
Jeroen van Wolffelaar
f61dfce39c
Make chop the alias and rtrim the main function, in order to get automagically
...
generated alias-listings correct.
2001-09-23 18:32:46 +00:00
Jeroen van Wolffelaar
929ae94c64
Let settype also accept 'int', 'bool', 'float' and 'null'
...
@Let settype also accept 'int', 'bool', 'float' and 'null' (Jeroen)
2001-09-22 01:39:14 +00:00
Hartmut Holzgraefe
03f7406711
proto fixes "double" -> "float"
2001-09-21 21:59:27 +00:00
Hartmut Holzgraefe
2c275bf793
renamed doubleval to floatval and made doubleval an alias to floatval
...
made is_float the function entry and is_double the alias
2001-09-21 21:29:14 +00:00
Sascha Schumann
4582d38519
Fix warning on Win32 (thanks to Sebastian)
2001-09-21 17:21:50 +00:00
Sascha Schumann
0a8677167d
don't use boyer_str_to_str. It is experimental
2001-09-21 16:17:14 +00:00
Sascha Schumann
9002e37e4e
Always seed the LCG from the request-init hook, otherwise the seed
...
would be shared among the threads which is quite pointless. Also
use a function of the current time as one factor.
Use gettimeofday() instead of time(), because it is faster on some
operating systems.
2001-09-21 13:38:44 +00:00
Sascha Schumann
f45555e62f
Rework some string-to-number and vice-versa functions to work smarter
...
(e.g. without using functions that use slow locales, without allocating
extra memory and with fewer integer/float operations)
2001-09-20 08:22:44 +00:00
Stig Venaas
926d1506e0
Added IPv6 support to gethostbyaddr()
...
@- Added IPv6 support to gethostbyaddr()
@ (Patch by Matthias Wimmer <matthias@charente.de> and venaas)
2001-09-19 18:08:15 +00:00
Sascha Schumann
e261d310a0
quickly fix newly introdued off-by-one
2001-09-19 11:03:58 +00:00
Sascha Schumann
e4ace6cde6
Rewrite _php_match_basetozval to need only one multiplication
...
per iteration and avoid the U?LONG_MAX hassle.
2001-09-19 10:57:50 +00:00
Sterling Hughes
563c0670e5
another attempt at fixing compile warnings...
2001-09-18 20:05:05 +00:00
Sterling Hughes
8092460830
hopefully fix win32 compile warnings
...
# I really wish i had a box to compile php with win32 on
2001-09-18 05:48:49 +00:00
Sterling Hughes
bcb426a207
Merge in qsort changes
2001-09-17 21:02:53 +00:00
Sterling Hughes
97fea0931c
Make rand thread safe when ZTS is defined.
2001-09-16 20:49:57 +00:00
Sterling Hughes
96763e8372
Hopefully fix compile warnings on win32 systems
2001-09-16 17:37:19 +00:00
Sterling Hughes
47f3851a00
for the daft folks that think 0 is a good seed.
2001-09-16 03:50:04 +00:00
Sterling Hughes
373fc12bb1
@ Make the seed options to srand() and mt_srand() optional, if the seed is
...
@ not specified, the generate the most random seed possible. (Sterling)
Please, if anyone has any comments on the way I generate this seed, speak up!
This seems to be the most "random" seed I could come up with...
This commit is 100% backwards compatible :)
Add myself to the authors list cause of recent work on the file
2001-09-16 03:46:59 +00:00
Rui Hirokawa
9c5580c7d4
Added support for japanese encoding to htmlentites() and htmlspecialchars(). @ Added support for japanese encoding to htmlentites() and htmlspecialchars(). (Rui)
2001-09-15 04:48:48 +00:00
Thies C. Arntzen
e929389eeb
fix strtr() when called with two parameters. this has been broken for some time!
...
guys, when "optimizing" functions you _shoudl_ write a testcase for the
working function and make _sure_ that it works afterwards!
2001-09-13 10:48:41 +00:00
foobar
5275b60398
Enable chroot() only if SAPI is CGI.
2001-09-12 02:07:46 +00:00
Sascha Schumann
4c69a970d3
Remove some unused variables
2001-09-11 07:52:55 +00:00
Sascha Schumann
2bbbec107b
A round of "d'ohs" for me, please.
...
We must not stop scanning after finding a "?", because we
need the information regarding the "#".
2001-09-10 11:22:43 +00:00
Zeev Suraski
517bd3018c
Do some justice to the doc team
2001-09-09 23:37:55 +00:00
Sascha Schumann
de963ce9c6
Better fix for mark problem
2001-09-09 14:52:39 +00:00
Sascha Schumann
c86c9f52b4
Fix mark-handling
2001-09-09 14:38:12 +00:00
Derick Rethans
78747bd2df
- Don't wrap lines... this is annoying while coding.
2001-09-09 13:29:31 +00:00
Derick Rethans
61d4f7fe65
- Really fix nl2br now... it's actaulyl faster now
2001-09-09 12:55:48 +00:00
Derick Rethans
176cd90bd7
- Fix for bug 11904
...
#- This is possibly not the best solution... feel free to improve
2001-09-09 11:42:36 +00:00
Sterling Hughes
ff2bc83c08
remove ARG_COUNT(ht)
...
# Is there any reason that the set_compare_func call is passed SORT_STRING
# instead of SORT_REGULAR??
2001-09-09 11:03:31 +00:00
Sterling Hughes
6963ac4050
export the mt rand functions...
2001-09-09 10:44:12 +00:00
Sterling Hughes
25d4500a86
I should really learn how to spell
2001-09-06 08:56:24 +00:00
Sterling Hughes
b7ba9e007d
avoid lowercasing the string
2001-09-06 08:54:54 +00:00
Sterling Hughes
33fc6e2d5f
add missing )
2001-09-06 07:33:45 +00:00
Sterling Hughes
8a156d9a39
fix ms compile warnings
2001-09-06 06:41:16 +00:00
Sterling Hughes
903c831be5
spaces -> tabs work cont.
2001-09-06 00:40:02 +00:00
Sterling Hughes
a4c905ff16
ws fix
2001-09-06 00:18:13 +00:00
Sterling Hughes
a1b11f0755
Fix ts build
...
# I've gotta start compiling --enable-experimental-zts... anyway we can make
# this the default when compiling from cvs? It'll help a large portion of
# compile issues with patches
2001-09-05 21:46:44 +00:00
Sterling Hughes
e121eaaef5
Straight out da bronx, I be using zend_parse_parameters()
...
# Word out to my peeps on Connor st.
2001-09-05 21:38:49 +00:00
Sterling Hughes
5ec58914fe
stray tabs and spaces
2001-09-05 21:04:30 +00:00
Sterling Hughes
f0c5631778
change range macro semantics
...
# Kinda torn between the two, thoughts?
2001-09-05 20:59:24 +00:00
Sterling Hughes
d930a72cd7
remove inline
2001-09-05 20:56:15 +00:00
Sterling Hughes
1b0f00d67f
a bit of api cleanup... move range stuff into a macro (properly :)
2001-09-05 20:52:45 +00:00
foobar
42b5521af5
revert bad commit.
2001-09-05 19:47:55 +00:00
Sterling Hughes
b9edf7c17c
API Update
2001-09-05 06:55:37 +00:00
Egon Schmid
03fbbb098c
Fixed some protos.
2001-09-04 10:44:28 +00:00
Sterling Hughes
38cacba117
Thanks sebastian
...
# I really like this whole qa team thingy
2001-09-04 10:13:55 +00:00
Sterling Hughes
536c96969b
update php_trim as well...
2001-09-04 09:35:53 +00:00
Sterling Hughes
c661449ebf
fix crash bug
2001-09-04 09:33:30 +00:00
Sterling Hughes
0935217091
fix proto
2001-09-04 06:21:48 +00:00
Sterling Hughes
e55315a375
tabs -> spaces
2001-09-04 06:20:23 +00:00
Sterling Hughes
fe03f6f4c2
Begin cleanup, api wise...
2001-09-04 06:18:11 +00:00
Sterling Hughes
3151916113
pval -> zval
2001-09-04 06:08:42 +00:00
Daniel Beulshausen
9b8886410d
fix zts+win32 build
2001-09-04 02:19:30 +00:00
Sterling Hughes
dda004bcfb
- update to php4 api
...
- expand case statements, ie:
case 1: case 2: case 3:
to
case 1:
case 2:
case 3:
- Remove un-necessary brackets and parentheses (only when it takes away from
readability, I know this is quite arbitrary, but I did my best :)
2001-09-03 23:30:33 +00:00
Andi Gutmans
1ecd31b66c
- Fix thread safe mode.
...
- Please don't use Java style function braces.
2001-09-03 20:21:00 +00:00
Derick Rethans
383691eec2
- Fix broken build
...
#- Please test before commit!
2001-09-03 17:38:10 +00:00
Stanislav Malyshev
0a143cf655
Add _php_math_zvaltobase and _php_math_basetozval
...
This allows to use bindec, etc. functions to convert numbers longer
than fits in long, using floats instead.
Note: the functions like decbin still don't use the zval-ed functions,
so they work only on longs yet.
2001-09-03 16:26:31 +00:00
Jeroen van Wolffelaar
dc8386e30d
Removed outdated comment until I've got a better one
2001-09-03 12:01:50 +00:00
Jeroen van Wolffelaar
efb83df9f9
Kill some warnings/errors (reported by Sebastian, more to come, but
...
could take some time. Update of ZTS-builderrors is welcome)
2001-09-03 11:57:15 +00:00
Sterling Hughes
79c27f0cd2
should be this
2001-09-03 08:47:45 +00:00
Sterling Hughes
b417b96fb8
- Update to the PHP4 API (newer macros)
...
- Improve error reporting from split()
- Some minor speed improvements
2001-09-03 08:44:02 +00:00
Sterling Hughes
f6d73d73fb
stray tabs
2001-09-03 06:10:45 +00:00
Sterling Hughes
f14ada19ac
cleanup sscanf() just a tiny bit, just so it looks like the rest of the code
...
in the string.c file.
2001-09-03 04:49:36 +00:00
Jeroen van Wolffelaar
0cb6a31906
Fix array_rand and array_suffle to use php_rand correctly
2001-09-03 01:54:04 +00:00
Jeroen van Wolffelaar
b0300e26df
Fix prototype
2001-09-03 01:46:03 +00:00
Jeroen van Wolffelaar
72c7ae080b
Fix SIGSEGV because HAS_SRAND didn't check wether the entry existed at
...
all
2001-09-03 01:25:24 +00:00
Jeroen van Wolffelaar
1a68fe49cb
Add forgotten files to MAIN
2001-09-03 01:10:29 +00:00
Jeroen van Wolffelaar
92f1248a49
Update credits
2001-09-03 01:09:35 +00:00
Jeroen van Wolffelaar
f7306ce010
Merge RAND_REDESIGN into MAIN
2001-09-03 01:06:23 +00:00
Andrei Zmievski
392e1edee8
@- Made in_array() and search_array() allow the needle to be an array in
...
@ itself. (Andrei)
2001-08-31 04:52:10 +00:00
foobar
d340c5b2bf
@- Added ini_get_all() function which returns all registered ini entries
...
or the entries for the specified extension. (Jani)
2001-08-30 17:47:04 +00:00
foobar
5dd2b6e2fd
According to Zeev this code is just for showing how to create overloaded classes.
2001-08-29 23:53:22 +00:00