Commit Graph

654 Commits

Author SHA1 Message Date
Derick Rethans
91424b2b91 - Fixed proto's (Patch by Zak) 2001-07-02 11:11:58 +00:00
Andi Gutmans
c977f29862 - Use ALLOC_HASHTABLE() instead of emalloc(sizeof(HashTable)) 2001-06-19 16:03:35 +00:00
Zeev Suraski
1093ed17fb Clean-up
Remove a lot of 100% redundent code
2001-06-13 17:04:36 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Sterling Hughes
b2bd3b315f move to php_strtok_r() 2001-05-27 01:18:12 +00:00
Andi Gutmans
4ddb24366f - Fix problem of output initialization 2001-05-23 16:52:45 +00:00
Sterling Hughes
17e5edbf18 @ Added the CONNECTION_ABORTED, CONNECTION_TIMEOUT and CONNECTION_NORMAL
@ constants. (Zak)
2001-05-23 03:37:53 +00:00
Andi Gutmans
177934732b - Start nuking not needed GINIT 2001-05-22 19:19:04 +00:00
Andrei Zmievski
4d78270b4e Moving some functions into Zend. 2001-05-21 15:47:52 +00:00
Andi Gutmans
d160031c7d - EG's are passed automatically to internal functions. 2001-05-21 15:27:11 +00:00
Sean Bright
0b716d18b1 Added get_defined_constants() function. Returns an associative array of
constants mapped to their values.
@- Added get_defined_constants() function to return an associative array of
@  constants mapped to their values. (Sean)
# If anyone sees a problem let me know.
2001-05-21 13:36:42 +00:00
Derick Rethans
dc43b9f574 - Reversed 'fix' for #9698
- Fix for bug #9698/#10681 (patch by kettler@gmx.net)
@- Added the 'u' modifier to printf/sprintf which prints unsigned longs.
@  (Derick)
2001-05-20 00:23:49 +00:00
foobar
16b94858b6 Fixed bug #10964 2001-05-19 22:21:40 +00:00
Sascha Schumann
d5cfb03ac9 munmap() file in RSHUTDOWN, if PHPWRITE fails. 2001-05-18 23:38:46 +00:00
Jon Parise
82b31fb7a3 @ - Added disk_total_space() to return the total size of a filesystem.
@   (Patch from Steven Bower)
2001-05-15 23:43:18 +00:00
Jon Parise
6c5db8d2d7 @ - Renamed diskfreespace() to disk_free_space() to conform to established
@   naming conventions. (jon)
2001-05-15 23:28:17 +00:00
Andrei Zmievski
1f9808b4ee Clean up call_user_func_*(). 2001-05-14 20:56:05 +00:00
Sterling Hughes
803bebb303 Use zend_is_callable to test whether or not the given callback is valid
before calling the function.
2001-05-14 20:06:06 +00:00
Sterling Hughes
47ee387d79 Use zend_is_callable() and fix sp of deprecated. 2001-05-14 19:19:03 +00:00
Sterling Hughes
c58fdadc1f Couple of changes (and a little whitespace correction, sorry to mix :(
1) Depreciate the call_user_method*() variety of functions, their
    functionality can be easily duplicated by using the call_user_func*()
    functions (using the array(&$obj, "method") syntax).

    2) Change some pval's to zval's.

    3) Improve the error handling mechanism of call_user_func*() to report
    an the class name and the function name if an object or class name is
    given.
2001-05-14 19:02:23 +00:00
Andrei Zmievski
8a86d17882 Need to use ELS_FETCH() here. 2001-05-14 14:16:44 +00:00
Andrei Zmievski
553e04be2f @- Fixed a bug in call_user_*() functions that would not allow calling
functions/methods that accepted parameters by reference. (Andrei)

* Allow separation of arguments in call_user_* functions - this allows calling
  functions that force parameters by reference.
* Use executor function table instead of compiler one.
2001-05-14 13:24:03 +00:00
Andrei Zmievski
8112d1beba @- Added is_callable() function that can be used to find out whether
@  its argument is a valid callable construct. (Andrei)
2001-05-09 20:06:39 +00:00
James Moore
f3342a5b55 Fix win32 build 2001-05-06 19:20:25 +00:00
foobar
6c21f7ef0f Moved ts_alloca_id() into MINIT like Andi requested. 2001-05-06 17:55:10 +00:00
foobar
8e006f81af Fix bug: #8834. Now there should be more random salts.. 2001-05-06 16:54:27 +00:00
Andi Gutmans
4c823e8a89 - Change macros from V_ to VCWD_ because of AIX name clash 2001-04-30 12:45:02 +00:00
David Croft
34f03f2c5c @ - Added key_exists() to check if a given key or index exists in an
@ array or object (David Croft)
Added key_exists() to check if a given key or index exists in an array or object
2001-04-30 04:06:09 +00:00
Wez Furlong
86c84da7c2 Discovered warn_not_available and used it. 2001-04-17 17:08:03 +00:00
Wez Furlong
57af70f707 Changes for streams. Added temporary fopenstream function to PHP so that
the streams can be tested.
2001-04-17 17:06:06 +00:00
André Langhorst
9762f64222 fix proto 2001-04-07 15:43:06 +00:00
Sascha Schumann
fa068b5297 Fix ZTS build 2001-03-24 01:08:13 +00:00
Romolo Manfredini
01ac20050e Added target ownership check in function copy for safe_mode operations 2001-03-23 09:30:51 +00:00
Sean Bright
90f3e09f08 Fixed prototype. 2001-03-22 14:43:48 +00:00
Sean Bright
e249545165 Fix for bug #9698.
# Anyone that can think of a way to fix long2ip(), feel free.
2001-03-21 13:53:38 +00:00
Andrei Zmievski
d9aa966a44 @- Added array_map() function that applies a callback to the elements
@  of given arrays and returns the result. It can also be used with a
@  null callback to transpose arrays. (Andrei)
2001-03-19 21:20:02 +00:00
Andrei Zmievski
770c66125d @- Added array_filter(), which allows filtering of array elements via
@  the specified callback. (Andrei)
2001-03-16 20:46:33 +00:00
foobar
88f41b4e91 This has got to be the last one.. 2001-03-16 18:18:01 +00:00
Andrei Zmievski
d73ef12429 @- Added array_reduce(), which allows iterative reduction of an array
@  to a single value via a callback function. (Andrei)
- Added array_reduce(), which allows iterative reduction of an array
  to a single value via a callback function.
- Fixed usage of zend_is_callable() in PCRE.
2001-03-12 03:06:53 +00:00
foobar
6795032cb8 HAVE_BINDLIB --> HAVE_LIBBIND 2001-03-11 03:49:21 +00:00
Andrei Zmievski
8d677828b9 @- Fixed argument checking for call_user_func* functions and allowed
@  specifying array($obj, 'method') syntax for call_user_func_array. (Andrei)
2001-03-09 21:42:26 +00:00
Zeev Suraski
0117c7848e this function will never return true... 2001-03-04 01:17:21 +00:00
Andrei Zmievski
80cdb812c1 @- Forced call_user_method() and call_user_method_array() to take the
@  object argument by reference. (Andrei)
* Forced call_user_method() and call_user_method_array() to take the
  object argument by reference.
* Also cleaned up the protos for those functions and brought
  call_user_method_array() into functional equivalence with
  call_user_method().
2001-03-02 20:22:14 +00:00
Sascha Schumann
95b3347d8b Provide proper function aliases, if the sendmail functions
don't exist.

Submitted by: Nadir Amra <amra@us.ibm.com>
2001-02-26 20:26:07 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Sascha Schumann
a40ee1f181 Actually compile on systems without syslog.
PR: #9412
2001-02-24 21:08:15 +00:00
Andrei Zmievski
1424e36315 Rename to array_search(). 2001-02-20 14:23:03 +00:00
Jason Greene
1888a98a4b Moved the core of in_array into the function php_search_array, which is called by
in_array and search_array (new)

@ Added search_array which works similar to in_array but returns
@ the key instead of a boolean. (jason@php.net)
2001-02-20 05:36:40 +00:00
Sascha Schumann
637e8e14aa There might be more systems which do not support chroot, so we check
for the existence of it.

Additionally, if chroot is not supported, the warn_not_available function
is invoked now.
2001-02-15 05:21:27 +00:00
Derick Rethans
8cef8a9ca1 - chroot does not work on windows 2001-02-15 00:43:44 +00:00
Derick Rethans
4a54a15fc6 - Added the chroot function for changing root in a script.
#- This can be usefull when using PHP in a shell environment, or when PHP
#  runs as CGI which needs a little more security
2001-02-14 10:48:48 +00:00
Zeev Suraski
bf84618244 Fix Windows build 2001-02-05 21:59:17 +00:00
Andrei Zmievski
5355703cf3 Allow calling static methods via call_user_method_* functions. 2001-02-05 17:37:47 +00:00
Rasmus Lerdorf
83cf6629ec @BeOS patch from svanegmond@bang.dhs.org modified somewhat by Rasmus
BeOS patch from svanegmond@bang.dhs.org modified somewhat by Rasmus
2001-01-21 17:29:15 +00:00
Sean Bright
457888ac44 Put these back where they belong. They weren't necessary unless ZTS and
HAVE_LOCALECONV were both defined.
2001-01-17 20:37:49 +00:00
Sean Bright
a588d65591 Added string comparison function strcoll(). It uses the current locale to
do the comparisons.
@- Added localeconv() and strcoll() functions for localization. (Sean)
2001-01-17 01:10:50 +00:00
Sean Bright
40f3524247 Added localeconv() function. Operates similarly to localeconv() defined in
locale.h.  Should work well under non-ZTS as well as ZTS.
2001-01-14 16:36:30 +00:00
Zeev Suraski
a85da45a66 Both thread-safe and thread-unsafe builds should be ok now 2001-01-13 23:49:44 +00:00
Rui Hirokawa
0afcb03de3 added iconv extension. 2001-01-09 15:11:23 +00:00
foobar
e247b206e0 If TZ environment variable is changed call tzset().
# Although man page for tzset() says it should be called automaticly
# by some of the time related functions, IRL this doesn't happen.
# PR: 3977, 4732, 5510, 6972, 7203, 8502, 8609
2001-01-09 09:02:21 +00:00
Rui Hirokawa
6368933118 added iconv_set_encoding() to change the encoding setting. 2001-01-08 02:39:52 +00:00
Rui Hirokawa
517b81ad43 added a output handler function ob_iconv_handler which tranforms output encoding using iconv(). 2001-01-08 01:40:33 +00:00
Zeev Suraski
338b9b0819 - Make the INI mechanism thread safe (fix necessary API changes from Zend)
- Make the Win32 non-TS configuration build again
2000-12-27 15:43:05 +00:00
Zak Greant
9e9688d1de Removed unused variable from is_scalar 2000-12-20 11:07:20 +00:00
Zak Greant
e4ca57bb57 Added is_scalar() function. 2000-12-18 19:23:50 +00:00
Frank M. Kromann
1e9acc15cf Fixing compilation on Win32. (and others) 2000-12-15 03:04:09 +00:00
Stig Bakken
6e1e78d1c6 @Added iconv() function (using libc or libiconv) (Stig) 2000-12-15 01:01:14 +00:00
Zeev Suraski
be895bcb96 Fix call_user_function() with objects - it could leak under certain circumstances 2000-12-13 22:50:10 +00:00
Sterling Hughes
fe13e4b05d @ Added the call_user_method_array function which allows you to call a method with an
@ arbitrary number of parameters. (Sterling)
2000-12-08 14:37:49 +00:00
Sascha Schumann
9fff35ac9f Hardcode the readdir entry as well 2000-12-07 15:33:30 +00:00
Andrei Zmievski
9b46346a23 We don't want any hard errors in PHP scripts unless absolutely necessary. 2000-12-07 14:54:52 +00:00
Kristian Köhntopp
f5abd4c50b Fugbix in call_user_func_array() if second argument is empty. 2000-12-07 14:14:00 +00:00
Sascha Schumann
4ada3dd3a0 Hardcode all functions which are mentioned in the Large File Support Spec
http://ewe3.sas.com/standards/large.file/specs/api+.007.html
2000-12-07 12:09:38 +00:00
Sterling Hughes
2cc8e2f8c7 @ Added the is_null() function that will return true if a variable is of
@ type null. (Sterling)
2000-11-29 15:37:38 +00:00
Sascha Schumann
949b0893dc The result of conv_z_macros and some manual conversion of
"return_value.*=.*IS_STRING" constructs to RETVAL_STRINGL.
2000-11-27 13:31:21 +00:00
Zeev Suraski
d4fc424554 Fix windows build 2000-11-26 14:25:31 +00:00
Sterling Hughes
0d1bcd480c @ Added the call_user_func_array() function which gives you the ability to
@ call a user function by passing an array of parameters as the second
@ argument.

@ Added the constant() function which returns the value of a constant given
@ the constant's name.
2000-11-24 21:05:25 +00:00
Zeev Suraski
030b707296 Update SAPI modules to interface with the new TSRM.
Enable thread-safety memory debugging in ISAPI when in debug mode
2000-11-18 02:44:04 +00:00
Jesus M. Castagnetto
cc73072804 Updated proto for highlight_file/highlight_string 2000-11-04 01:18:10 +00:00
Zeev Suraski
78194a47b7 - Complete the move to the new INI parser. (Side effect: at last, people
can finally have spaces and tabs in their extension statements...)
2000-10-30 23:39:14 +00:00
Zeev Suraski
f52a59062d parse_ini_file() supports a new optional 2nd argument that instructs it
to divide the directives to arrays according to the sections in which they
reside
2000-10-29 23:34:33 +00:00
Zeev Suraski
4af433d627 Use the new INI parser for parse_ini_str()
- parse_ini_str() is now thread-safe, and supported under Windows (Zeev)
2000-10-29 22:42:01 +00:00
Zeev Suraski
1fd09132c2 Initial steps to move the INI mechanism to the Zend engine 2000-10-29 11:38:26 +00:00
Zeev Suraski
3dc7fc54a0 - URL-opened files now store the HTTP response header in $http_response_header
- Some layout updates
2000-10-28 01:31:56 +00:00
Andrei Zmievski
a35bf41670 Added array_sum() function. 2000-10-25 17:40:11 +00:00
Sascha Schumann
f69a4a431a Fix php://* being handled by the ftp handler 2000-10-22 14:41:02 +00:00
Rasmus Lerdorf
b3fb8a6e97 Aha, Sascha made a mistake! ;)
Make this thing compile again without trans-sid
2000-10-16 22:12:28 +00:00
Sascha Schumann
1c85ad029b Enable users to set the HTML tags to rewrite
through a configuration directive
2000-10-16 17:25:36 +00:00
Hartmut Holzgraefe
6d5f1d97f8 now it works for me as CGI and APXS, with or without --enable-debug ... 2000-10-13 10:04:17 +00:00
Daniel Beulshausen
6fb51171c8 compile fixes & update of win32 dsp 2000-10-13 09:13:01 +00:00
Hartmut Holzgraefe
cae27179ce fopen wrappers cleanup
- comfiguration is now done by an ini parameter
    instead of a compile time option
  - the implementations of the three standard wrappers
    now live in seperate files in ext/standard
  - the compiler is happy again, no more warnings
2000-10-13 00:09:31 +00:00
Hartmut Holzgraefe
be19c812ab added some missing protos 2000-10-11 11:25:13 +00:00
Sascha Schumann
e2efb3cf06 Remove unnecessary include directive 2000-09-19 17:39:43 +00:00
Zeev Suraski
c45b1c2c8b - Fix warnings
- Fix URL scanner startup crash
2000-09-19 17:37:34 +00:00
Sascha Schumann
4b3fb7b05e Add new URL scanner. This version is up to 20% faster. It will be
enabled by default once I'm sure that it works in every case.

To enable it, apply s/url_adapt_ext/url_adapt_ext_ex/ to session.c
2000-09-19 17:32:27 +00:00
Zeev Suraski
6c3d7449e1 - Made eval() and several other runtime-evaluated code portions report the
nature and location of errors more accurately (Stas)
2000-09-12 20:48:33 +00:00
Daniel Beckham
b852f3941f reversed chomp alias addition as per Andi Gutmans' request 2000-09-12 19:00:21 +00:00
Daniel Beckham
5925071957 added chomp() alias for chop() for us Perl purists. 2000-09-12 15:54:10 +00:00
Stanislav Malyshev
1ccac6ed55 Add additional parameter to parse_str for saving result (thanks to
John Bafford <dshadow@zort.net>)
@ Added second parameter for parse_str to save result (John Bafford)
2000-09-11 14:50:26 +00:00
Sterling Hughes
0b9a78cb1e @- Added the pathinfo() function. (Sterling) 2000-09-10 05:59:16 +00:00
Zeev Suraski
6c4cb4c079 Security related updates:
- Introduce php_open_temporary_file(), in place of tempnam().  Still
  needs testing under UNIX (mkstemp()), works reliably under Windows now.
- Reimplement the mechanism for unlinking uploaded files at the end of the request
  (was it ever tested?).  Files moved with move_uploaded_file() will not be unlink()'d
  again, to avoid (albeit very unlikely) race conditions.
2000-09-09 11:41:14 +00:00
Zeev Suraski
3edf46ff73 Implement move_uploaded_file() (untested) 2000-09-08 22:31:21 +00:00
Andrei Zmievski
b409d2f9ea is_uploaded_file() is probably a better name. 2000-09-08 21:58:28 +00:00
Zeev Suraski
75086e3088 - Implemented is_upload_file() 2000-09-08 21:56:47 +00:00
Stanislav Malyshev
3fb701add0 More fixes fo ini_ handling functions 2000-09-05 18:33:02 +00:00
Rasmus Lerdorf
4a22d2e832 Add EscapeShellArg() function which turns a b into 'a b' and
a'b into 'a'\''b'
@Add EscapeShellArg() function (Rasmus)
2000-09-05 16:55:32 +00:00
Stanislav Malyshev
be83e732af Fix ini_restore variable length 2000-09-05 14:23:16 +00:00
Sterling Hughes
9f86ff884f @Add a php.ini option session.use_trans_sid to enable/disable trans-sid. (Sterling) 2000-09-04 22:21:10 +00:00
Sam Ruby
0240a571c8 Unitialized variable causes trap on Windows 2000-09-02 15:54:18 +00:00
Andrei Zmievski
cd8af6aa44 @- Added support for user defined 'tick' callback functions. This helps
@  emulate background processing. (Andrei)
2000-09-01 16:10:17 +00:00
Rasmus Lerdorf
fc3acfc4d5 Some minor cleanup to make W3C's tidy validator happy 2000-08-27 22:46:40 +00:00
Stig Bakken
7eeda99a05 @Added php_uname() function (Stig)
Added php_uname() function.
2000-08-27 19:42:45 +00:00
Stig Bakken
03471b21ee @Added ob_get_length function (Stig)
Added ob_get_length() function (returns size of buffer)
2000-08-25 03:10:42 +00:00
Zeev Suraski
c542f9a3f4 - Fix IMAP build problem
- Allow external DLLs to use warn_not_available
2000-08-24 18:49:49 +00:00
Stanislav Malyshev
5a7409ee1a Fix by-reference passing for scanf's
@- Fix by-reference parameters passing for xml_ functions and for scanf functions (Stas)
2000-08-20 16:09:06 +00:00
Zeev Suraski
7a45e3cb89 - Update NEWS
- Fix non ZTS Windows build
2000-08-19 18:01:04 +00:00
Stanislav Malyshev
65bb194d65 Fix byteorder for il2long and long2ip (#6159)
@- Fix byte order for ip2long and long2ip (Stas)
2000-08-15 10:32:55 +00:00
David Croft
1a5d90c4ea presumably this was wrong 2000-08-14 08:37:28 +00:00
Zeev Suraski
a120608807 Make COM work in a multithreaded environment 2000-08-11 13:30:37 +00:00
Thies C. Arntzen
57faf76605 fix #6061 2000-08-09 17:52:30 +00:00
Hartmut Holzgraefe
ea5ab044bf trans-sid rewrite, is now state-aware (fix for bug #3411 and friends) 2000-08-01 07:45:14 +00:00
Egon Schmid
e4b7e9e916 Protos fixed. 2000-07-26 11:43:01 +00:00
David Croft
83513d9580 Changed lots of PHP 3 licence headers to PHP 4, mainly in .h files.
Added a few RCS $Id$ tags.

# Note: I have avoided changing any .h files if the corresponding .c file
# had not already been changed as I am not sure if there are any legal
# issues here. So some extensions still have PHP 3 headers.
2000-07-24 01:40:02 +00:00
Thies C. Arntzen
9752d1a089 (getimagesize) fix FORCE_REF. 2000-07-23 16:49:42 +00:00
David Croft
8dd1fdb1a0 wordwrap function from Chris Russel <russel@yorku.ca>
differences from his patch:
 - wordwrap width and wrap-string now optional parameters
   (default to 75 and "\n" respectively)
 - wordwrap_byte is now just an automatic special case of wordwrap
 - Zend API compliant

@- Added new function "wordwrap" to wordwrap long strings from Chris
@  Russel <russel@yorku.ca> (David Croft)
2000-07-22 01:12:24 +00:00
Andrei Zmievski
885e40db05 @- Updated str_pad() to be able to pad on left/right/both sides. (Andrei) 2000-07-08 20:38:23 +00:00
Andi Gutmans
b9037f7d69 - Make PHP compile again under Windows.
- Please be careful when you make such changes.
2000-07-02 15:12:34 +00:00
Kristian Köhntopp
0249137148 unlink() is not a function related to HAVE_SYMLINK. It is being
used to delete files (actually, in Unix, names of files, as in
Unix nobody has deleted a file, ever).
2000-07-02 13:41:26 +00:00
Zeev Suraski
7fb72c1726 Fixed opendir() thoroughly 2000-06-29 21:51:40 +00:00
Kristian Köhntopp
02cad904ee ezmlm_hash() function also available for php4. 2000-06-29 14:07:10 +00:00
Kristian Köhntopp
c54fa54e36 Added function php_sapi_name() as written by Stefan Livieratos. 2000-06-26 14:43:37 +00:00
Egon Schmid
ac523aa37e Correct protos call_user_func() and call_user_method(). 2000-06-24 18:46:17 +00:00
Sascha Schumann
2297f670b1 Change the serialization semantics to:
* if a certain object is of class INCOMPLETE_CLASS, the serializer will
    lookup the previously stored original class name of that object, and
    use that class name to serialize the object.

Change the deserialization semantics to:

  * if the class of an object, which is to be instantiated, is not found
    in the current context, the class name will be stored for later
    retrieval, and the class of that object is changed to INCOMPLETE_CLASS.

All function calls, property gets, and property sets operating on an
object of class INCOMPLETE_CLASS cause the execution to halt and to
output an informative error message.
2000-06-23 16:21:31 +00:00
Thies C. Arntzen
cfa7028d66 @- added spliti() function. (Thies) 2000-06-23 11:48:02 +00:00
Rasmus Lerdorf
777f8dccca Add a crc32 checksum function - used by the udm_search search engine
and currently run through a system call.  This will speed up the udm_search
php frontend significantly.
@ Add a crc32 checksum function - used by the udm_search search engine
@ and currently run through a system call.  This will speed up the udm_search
@ php frontend significantly. (Rasmus)
2000-06-21 22:51:29 +00:00
Ben Mansell
6a449f2b02 Initialise lcg_globals correctly
# Fixes bug 5075
2000-06-20 11:35:12 +00:00
Zeev Suraski
da66298659 - Fix a couple of wranings in the FTP code and in parsedate.y
- Be safer with LC_MESSAGES
- Align with the latest Zend change in call_user_function_ex()
2000-06-17 16:49:03 +00:00
Brian Moon
e38d7accb7 set_file_buffer was not being exported. This is now fixed. 2000-06-15 19:02:02 +00:00
Andrei Zmievski
e5360259a4 We should define symlink functions only when HAVE_SYMLINK is defined.
Otherwise, they should be aliased as not available.
2000-06-13 18:07:19 +00:00
Sascha Schumann
d1c1e99d98 Rename phpmath.h to php_math.h. 2000-06-13 16:31:57 +00:00
Sascha Schumann
165361a515 Remove single ; 2000-06-13 09:06:31 +00:00
Stig Venaas
f18b903d5f Changed array_subtract to array_diff 2000-06-10 19:09:56 +00:00
Stig Venaas
99f151f1bd Adding fuctions array_unique, array_intersect and array_subtract. 2000-06-10 18:58:45 +00:00
Andi Gutmans
6ce07a85e4 - Change register_internal_class to zend_register_internal_class for
- consistency.
- Andrei: I'm still thinking about the _ex you want me to implement
2000-06-09 08:41:59 +00:00
Thies C. Arntzen
c183168481 beautify 2000-06-07 09:55:37 +00:00
Andrei Zmievski
b928bdceb8 @- Added str_pad() for padding a string with an arbitrary string on left or
@  right. (Andrei)

Added str_pad() for padding a string with an arbitrary string on left or right.

# With all those macros, the code is starting to eerily resemble Perl's guts.
2000-06-06 20:42:33 +00:00
Clayton Collie
0b7fd17c2b Added sscanf() function. 2000-06-06 18:58:15 +00:00
Thies C. Arntzen
10eb67a3aa @- added fflush() function. (Eric Huss)
# the socket fsync() might not work on Win32.
#
# i'm not sure if we need any code for flushing sockets as they are
# currently alway written via write().
2000-06-06 12:16:44 +00:00
Sascha Schumann
102c6ce4b8 Move main.h to php_main.h. 2000-06-05 23:24:42 +00:00
Andi Gutmans
3701bc4207 - ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch 2000-06-05 19:47:54 +00:00
Jouni Ahto
9d2bcf2bd0 - Restore locale settings to state they were at module startup if they
were changed.
2000-06-05 18:47:34 +00:00
Zeev Suraski
5673378ea6 - Allow all functions that receive user-defined function callbacks to accept
an array that contains an object and a method name, in place of a function
  name, e.g. usort($array, array($obj, "ObjSort"))
(I checked the code in array.c and basic_functions.c, other code which uses
call_user_function() may still force the function_name argument to be of type
IS_STRING, which prevents this feature from working - and is no longer necessary)
2000-06-03 04:16:46 +00:00
Andrei Zmievski
01a4220954 @- Added array_merge_recursive() that will recursively merge values
@  under the same keys. (Andrei)
2000-05-30 17:03:56 +00:00
Zeev Suraski
3637589db1 Oh yeah, I said there's no need for it to be defined didn't I? :) 2000-05-29 16:51:27 +00:00
Zeev Suraski
c07a056dac There's really no need for an entire file for a one line function... 2000-05-29 16:13:38 +00:00
Thies C. Arntzen
635d7fbfae allow_call_time_pass_reference fix: similar_text 2000-05-29 15:38:32 +00:00
Hartmut Holzgraefe
fb39eda0d8 a second (cleaner?) try on warnings about unsupported functions 2000-05-27 19:27:20 +00:00
Andi Gutmans
afccb58612 - I'm not sure if PHP_NOT_IN_THIS_BUILD is the way to handle these
- functions but in any case I have changed it to PHP_NOT_IN_THIS_BUILD()
2000-05-27 18:55:11 +00:00
Hartmut Holzgraefe
69d1e788c0 if a module provides a function it should also do so if the function
is not functional due to configure findings
the function should offer a meaningful warning if it is not supported
instead of just beeing undefined
i had already changed this in 'gd', now this is doing it for 'standard'
2000-05-26 17:04:02 +00:00
Hartmut Holzgraefe
df4547a3df another bunch of proto fixes 2000-05-23 23:13:02 +00:00
Hartmut Holzgraefe
4571d8ddea name changed from levdist() to levenshtein()
(although i bet we'll get a    levenstein() alias some day)
2000-05-23 14:37:39 +00:00
Hartmut Holzgraefe
0eb51100b7 added function "int levdist(string str1, string str2)"
that will calculate the Levenshtein distance between two
strings (faster and possibly more accurate than similar_text())
2000-05-23 14:10:37 +00:00
Jouni Ahto
e80b2b13fa Fix #4230. Putenv() was modifying its argument, a no-no. 2000-05-21 21:13:32 +00:00
Zeev Suraski
e043439ff6 Update the license with the new clause 6 2000-05-18 15:34:45 +00:00
Andrei Zmievski
fdbea075fa @- Added array_rand() function. (Andrei) 2000-05-09 19:27:00 +00:00
Sascha Schumann
2df8e7341e Move <syslog.h> inclusion into php_syslog.h. This will make sure that
all source files "get it."
2000-05-07 00:10:32 +00:00
Sascha Schumann
54fa1a77d7 On some systems, <syslog.h> defines syslog to another symbol, so that
syslog.lo does not contain the expected symbols. Including <symbol.h>
in basic_functions.c fixes the resulting linking problem.
2000-05-06 23:17:11 +00:00
Andrei Zmievski
5c5ec88292 @Added substr_count() from Peter Kovacs. (Andrei)
# also some todo stuff
2000-04-26 00:29:59 +00:00
Andrei Zmievski
a15b08a709 Just a type cast is sufficient. 2000-04-19 18:36:50 +00:00
Evan Klinger
d6c66f3b7c @- Fixed long2ip() to return the correct IP address. (Evan)
# ip2long() is still broken.
2000-04-18 22:50:24 +00:00
Andrei Zmievski
c7100c4a1a Added natural comparison/sorting routines using code from Martin Pool.
@- Added natural comparison/sorting routines strnatcmp(), strnatcasecmp(),
@  natsort(), and natcasesort(). These are useful for comparing and sorting
@  strings that contain numbers. Based on the code from Martin Pool
@  <mbp@humbug.org.au>. See http://www.linuxcare.com.au/projects/natsort/
@  for more info on natural sorting. (Andrei)
2000-04-12 19:39:02 +00:00
Zeev Suraski
64f91d80fa Object overloading API changed slightly (llist is now a pointer) 2000-04-10 20:21:02 +00:00
Hartmut Holzgraefe
744fe82e0a added the other usefull constants besides M_PI from math.h
as PHP constants
2000-04-08 23:53:19 +00:00
Colin Viebrock
0c2b366ce1 phpinfo() prettying 2000-04-05 21:43:03 +00:00
Sascha Schumann
6c8f9bf3b4 Do not add dl function, if libdl is not present.
PR: #3947

Declare user_shutdown_function_name() as static to kill warning.
2000-03-29 17:33:44 +00:00
Sterling Hughes
6db2262102 Tis protoriffic. 2000-03-29 01:39:04 +00:00
Sterling Hughes
74d30dff7b *** empty log message *** 2000-03-28 20:26:02 +00:00
Sterling Hughes
f76e0a4077 *** empty log message *** 2000-03-28 18:16:41 +00:00
Andrei Zmievski
ddf3740cf9 @ Added is_numeric() that returns true if the argument is a number
@ or a numeric string. (Andrei)
2000-03-16 16:02:23 +00:00
Sam Ruby
ec8add1a4c Only define crypt if it is present 2000-03-07 12:28:06 +00:00
Stig Bakken
99e0b36321 @Cleaned up extension namespace (Stig)
Cleaned up extension namespace, and changed ext/standard into one single
extension.
2000-03-06 20:37:11 +00:00
Stig Bakken
d02fe90b00 Change extension names in all extensions' zend_module_entry to their
directory name.
2000-03-06 18:44:01 +00:00
Andrei Zmievski
b1de472ba3 Don't need this check. 2000-03-04 19:26:27 +00:00
Andrei Zmievski
0e18779e8b @Added ip2long() and long2ip() courtesy of Faisal Nasim <faisal@nasim.org> 2000-03-04 17:28:16 +00:00
Zeev Suraski
d34b144061 @- Added parse_ini_file(). Currently implemented in non thread safe version
@  of PHP, and currently lacks section support (Zeev)
- Bring the non thread safe .dsp's uptodate
2000-03-04 02:59:14 +00:00
Zeev Suraski
1261271839 Allow the INI callbacks to know at what stage PHP is 2000-02-26 15:36:23 +00:00
Zeev Suraski
fd344d3602 @- Added ini_set() as an alias to ini_alter() (Zeev) 2000-02-26 14:53:18 +00:00
Egon Schmid
dcf5f1a8d5 Most functions don't have protos. 2000-02-24 07:46:56 +00:00
Zeev Suraski
b82f261918 Fix name 2000-02-23 22:50:57 +00:00
Zeev Suraski
6981775d23 Remove obsolete code 2000-02-23 21:52:23 +00:00
Stig Bakken
b275477b76 (PHP getrusage) don't define this function at all if the getrusage() function
is not available on the system.
2000-02-23 21:37:43 +00:00
Zeev Suraski
86fa2aade2 the pipe is breaking all the time 2000-02-19 23:41:32 +00:00
Zeev Suraski
003ef1aa74 Trap bailout of shutdown functions 2000-02-13 00:26:54 +00:00
Andrei Zmievski
a60e91b313 (request_shutdown) Prevent infinite loop on shutdown if there is an error
in shutdown function.
(php_array_walk) Print a warning if the walk function doesn't exist.

Split shutdown function call into a separate function that's called with
zend_hash_apply() instead of as destructor to keep hash consistent.

This fixes bug #3419.
2000-02-11 21:14:42 +00:00
Zeev Suraski
80bdd19e03 Fine tune Andi's patch 2000-02-11 15:59:30 +00:00
Andi Gutmans
29280bb9ec - Get rid of some more evil MSVC5's and switch standard/ to use PHP_WIN32 2000-02-10 21:53:56 +00:00
Zeev Suraski
6d0ab6166c SAPIfication, Episode VI: Return of the SAPI
Remove mostly all references to APACHE and CGI_BINARY from the code.

- Apache include files are no longer included by any PHP code, except for the Apache SAPI module.
- No server specific code is in any of the base PHP code.

Still left to be done:
- Eliminate any references to APACHE from the few remaining modules.
- Move request_info.c's logic to SAPI
- Modify the regex function names, and globals, so that we can always
  include them, without having to fear any interference with Apache;
  Always use the bundled regex library
2000-02-10 19:41:21 +00:00
Zeev Suraski
0fd89aa20d More cleanup - move getenv() to SAPI 2000-02-10 17:55:01 +00:00
Thies C. Arntzen
4a824eb8cb @- Added NULL-support in gettype(). (Thies) 2000-02-10 15:51:50 +00:00
Zeev Suraski
3a816341f9 Cleanup patches 2000-02-05 15:16:12 +00:00
Zeev Suraski
86a19f4714 Add the complement to the putenv() security 2000-01-31 22:31:00 +00:00
Zeev Suraski
5540028340 @- Added the ability to prevent the user from overriding certain environment
@  variables in Safe Mode (Zeev)
- Finished work, more or less
2000-01-30 22:10:30 +00:00
Zeev Suraski
01362974d6 Some more work, I'll finish this when I get home 2000-01-30 20:49:16 +00:00
Zeev Suraski
430571d62c Initial work on the protected env vars stuff 2000-01-30 20:31:41 +00:00
Zeev Suraski
62114c1806 Destructors no longer return ints, the low level problem it was intended to solve is long gone now... 2000-01-17 17:33:37 +00:00
Zeev Suraski
972631be71 - Added flush() support to SAPI
- Got rid of the old flush() implemenetation in favour of the new one
- Added implicit_flush() support to the output buffering layer.
@- Added implicit_flush() to control whether flush() should be called
@  implicitly after any output (Zeev)
2000-01-13 17:37:25 +00:00
Andi Gutmans
60841f1231 - Separate the overloaded objects' types from Zend's data types.
There is no reason for them to be the same, and IS_METHOD just cluttered
  the data types.
- Overloaded elements should now use OE_IS_OBJECT, OE_IS_ARRAY, and
  OE_IS_METHOD
2000-01-04 13:56:13 +00:00
Sascha Schumann
43ae2bffbb Happy Y2K patch! Happy new year (or the new millennium, depending on whether
you start counting at 0 or 1).
2000-01-01 01:32:05 +00:00
Zeev Suraski
e538fcbf10 @- Fixed a bug in ODBC error reporting (Zeev)
@- Added PHP_Logo_GUID() and Zend_Logo_GUID() functions, that return the GUIDs
@  of the PHP and Zend logos used in phpinfo() (Zeev)
1999-12-21 20:35:43 +00:00
Andrei Zmievski
1ad5180f28 getParameters -> zend_get_parameters 1999-12-20 17:34:55 +00:00
Zeev Suraski
489de5dce2 Support the latest update to call_user_function_ex() 1999-12-19 18:58:27 +00:00
Zeev Suraski
a1ad2872ee - The tree compiles again 1999-12-18 22:40:35 +00:00
Zeev Suraski
3ee4e65c95 More php3_ annihilation 1999-12-18 04:01:20 +00:00
Zeev Suraski
2d0b84ee30 More work on php3_ annihilation... 1999-12-17 20:55:32 +00:00
Zeev Suraski
fb1c77bd4f - Made PHP_VERSION and PHP_OS work again
- More php3_ cleanup
@- Restored the PHP_VERSION and PHP_OS constants (Zeev)
1999-12-17 20:55:31 +00:00
Zeev Suraski
02d3b39420 More php3_ annihilation 1999-12-17 19:16:50 +00:00
Andrei Zmievski
8f17fbb900 Added get_loaded_extensions(), extension_loaded(), and
get_extension_funcs() functions.
@ Added get_loaded_extensions(), extension_loaded(), and
get_extension_funcs() functions. (Andrei)
1999-12-16 23:47:10 +00:00
Andrei Zmievski
1be7a8d461 Moved function_exists() to Zend library. 1999-12-14 22:15:55 +00:00
Thies C. Arntzen
6553540153 @- implemented count_chars(). (Thies) 1999-12-14 03:52:12 +00:00
Sascha Schumann
e911ee38bd Make rand.c thread-safe. 1999-12-13 18:31:29 +00:00
Sascha Schumann
d9258da42e @- Made pageinfo.c thread-safe (Sascha) 1999-12-12 16:14:40 +00:00
Rasmus Lerdorf
dfd0f8824c More maintainer-mode cleanups 1999-12-05 14:16:37 +00:00
Sascha Schumann
5b983c944f Clean up php3.*\.h files. The files itself are renamed, and references in all
.*\.[ch] files were changed. There is a slight chance that my script missed
a few changes, please correct them manually.
1999-12-04 19:19:57 +00:00
Sascha Schumann
3b515617a4 Make array.c thread-safe 1999-12-01 17:21:52 +00:00
Andi Gutmans
2337d110f9 - Added opened_path to php_fopen_wrapper() and the URL fopen wrapper (it's not
always properly set, it's a TODO for all of us).  This enables us to implement
  true 'use' support.
@- Added support for the 'use' keyword - behaves like 'require', but will not
@  use the same file more than once (Andi & Zeev, Zend library)
1999-11-30 20:18:11 +00:00
Sascha Schumann
6216edda44 Make basic/string functions thread-safe 1999-11-28 00:31:02 +00:00
Sascha Schumann
1a851b5d03 Kill undefined reference 1999-11-26 22:37:45 +00:00
Sascha Schumann
9f386181f5 Undefine HAVE_PUTENV, if ZTS is used 1999-11-26 21:20:40 +00:00
Sascha Schumann
2ec047e1ec Kill one race. 1999-11-26 21:04:40 +00:00
Zeev Suraski
e9742f5458 Cosmetic changes 1999-11-23 21:08:51 +00:00
Thies C. Arntzen
f24db304ee @- Implemented get_html_translation_table() function. (Thies)
(PHP get_html_translation_table) new function.
1999-11-21 13:25:04 +00:00
Andrei Zmievski
e46198bf7b (PHP substr_replace) New function.
@- Added substr_replace() function. (Andrei)
1999-11-16 22:44:13 +00:00
Andrei Zmievski
62eeb9278c It's in array.c now. 1999-11-13 20:32:49 +00:00
Andrei Zmievski
438addf331 Split array functions into separate module. 1999-11-13 20:31:54 +00:00
Stig Bakken
fdc6d630db @Fix min/max behaviour (Thies)
#Andrei: I left the convert_to_long() in there, it doesn't really make
#much of a difference.
1999-11-09 07:59:50 +00:00
Zeev Suraski
0700ad3417 - Win32 fixes
- COM module improvements from Boris Wedl
1999-11-06 10:01:55 +00:00
Andrei Zmievski
602cb959fc (PHP multisort) More work, not yet done though. 1999-11-04 21:55:47 +00:00
Evan Klinger
b1c4f8978d #I hope this is the correct way to 'fix' this.
Fix compile warning
1999-11-03 02:53:52 +00:00
Andrei Zmievski
f31c9d7d2a Remove extraneous comment.
# Pay no attention to multisort() at the moment.
1999-11-02 14:39:12 +00:00
Evan Klinger
229a26a497 (PHP getprotoby{name,number}) New Functions
@- Implemented getprotoby{name,number} (Evan)
1999-11-02 03:47:09 +00:00
Andrei Zmievski
92f6a8b20e Added array_pad() function.
# Ignore multisort() for now.
@- Added array_pad() function. (Andrei)
1999-11-01 20:51:04 +00:00
Evan Klinger
f7440c020d (PHP getservby{name,port}) New functions.
@- Added new getservby{name,port} functions. (Evan)
1999-11-01 01:07:51 +00:00
Andrei Zmievski
b8ecfa18c1 (PHP str_repeat) New function. 1999-10-27 22:06:05 +00:00
Thies C. Arntzen
ea880d2b86 moved output.c into ext/standart and made it thread-safe.
moved output-buffering related functions from basic_functions to output.c
Win32 project need to be updated to reflect new position.
# i'm not really happy with this solution, but it seemed the easiest one!
# the whole output code is a bit hard to understand...
@- Output-Buffering system is now Thread-Safe. (Thies)
1999-10-27 18:30:41 +00:00
Andrei Zmievski
1a2f656816 Forgot to remove function entry. 1999-10-27 02:19:53 +00:00
Andrei Zmievski
21ce8b7c64 (PHP array_map) Away with it. 1999-10-26 19:57:10 +00:00
Thies C. Arntzen
6581d11cea folding fix (xemacs 21 loads the file again;-) 1999-10-24 18:15:42 +00:00
Andrei Zmievski
ee6c1ea743 (PHP extract): Fixed bug that would mess up global and referenced
variables in certain cases.
1999-10-19 14:43:48 +00:00
Andi Gutmans
ad84f02efb - Get windows version to compile again. No biggy if array_map is not #if 0'd
out even if it doesn't work.
1999-10-16 10:14:47 +00:00
Andrei Zmievski
0a829ab104 (PHP array_map) Temporarily #if 0 this. 1999-10-15 21:24:15 +00:00
Andrei Zmievski
c671332b29 Massive change of zend_error() to php_error(). 1999-10-15 19:37:44 +00:00
Andrei Zmievski
738c36932a @- Fixed shuffle() so that it no longer breaks on Solaris. (Andrei) 1999-10-15 19:25:27 +00:00
Thies C. Arntzen
ac997bb6c2 (is_resource, is_bool) new functions
@- Added is_resource(), is_bool() functions. (Thies)
1999-10-15 18:15:02 +00:00
Andrei Zmievski
9e773dfde2 Modified sorting functions to use updated zend_hash() prototype. 1999-10-11 21:42:42 +00:00
Jouni Ahto
9109d8dcdd (PHP setlocale) Locale settings are now correctly restored to the values
set in environment at request shutdown.
@- setlocale doesn't anymore screw up things if you forgot to change it back
   to the original settings. (Jouni)
# Trying to conform to the rules set up by Andrei. Let's hope this works.
1999-10-08 02:10:57 +00:00
Thies C. Arntzen
657edcd50e - replaced most getParamters against getParamtersEx calls
- removed ParamterPassedByReference where appropiate
1999-10-06 12:54:45 +00:00
Thies C. Arntzen
5a605ae6f4 fix some warnings 1999-10-05 12:09:08 +00:00
Andrei Zmievski
cb78ebc0de Taken from PHP3 source. 1999-10-04 21:10:26 +00:00
Andrei Zmievski
23e8d1762d Added array_reverse() function. 1999-10-01 17:36:54 +00:00
Andrey Hristov
bfa7b6b145 - Updated array functions to use high-performance API
- Updated preg_split() to allow returning only non-empty pieces
1999-09-24 22:44:41 +00:00
Andrey Hristov
53fb0ea075 A couple of fixes. 1999-09-21 17:06:30 +00:00
Thies C. Arntzen
8638a61df9 added krsort() function 1999-09-21 14:36:41 +00:00
Andi Gutmans
6735ebb271 - Move some more language specific functions over to Zend.
get_class() and friends.
1999-09-20 21:29:41 +00:00
Andi Gutmans
96a19593b2 - Internal functions which are basic language functions should be in Zend
and not in PHP. I.e. strlen(), each(), error_reporting(), count(),
  get_class_name().
1999-09-20 16:56:02 +00:00
Thies C. Arntzen
4bb329eafb added array_count_values function. 1999-09-20 10:09:57 +00:00
Thies C. Arntzen
328d08bd63 HASH_OF is usable enough (i hate duplicating macros all over the place) 1999-09-15 09:51:20 +00:00
Andi Gutmans
0a7fc83253 - gettimeofday wasn't registered. 1999-09-15 05:08:45 +00:00
Thies C. Arntzen
da599af7cb is_array & friens speedups 1999-09-14 14:18:18 +00:00
Rasmus Lerdorf
0fd0323956 Fix a warning 1999-09-14 14:09:57 +00:00
Thies C. Arntzen
41da939988 count() now uses the new getParamertersEx API. 1999-09-14 13:34:27 +00:00
Zeev Suraski
a1784083e9 Time to do that - rename the output layer prefix 1999-09-12 03:25:02 +00:00
Andrey Hristov
6101d108e0 Here you go, Egon. 1999-09-07 19:41:28 +00:00
Andrey Hristov
7aacff63c9 Added second parameter to array_keys() which allows returning keys
only for a specific value in an array.
1999-09-07 18:29:59 +00:00
Egon Schmid
f0f7b9de53 File should here be string. 1999-09-06 20:13:23 +00:00
Jakub Skopal
5cc16d86b0 Added addcslashes(), stripcslashes().
Reverted addslashes() to the very original behaviour.
1999-09-05 20:55:13 +00:00
Andi Gutmans
14d9a59f1c - Make dir functions compile in Win32
- Fix too early memory manager initialization (For you Thies)
1999-09-05 19:04:40 +00:00
Rasmus Lerdorf
d3439023d3 Catch a timeout and add user-level interface for connection handling 1999-09-04 21:10:39 +00:00
Stig Bakken
b55d490ef0 fix for bug #2191 1999-08-31 15:27:31 +00:00
Egon Schmid
2c0b8b5ac8 Oops, file should be string here. 1999-08-29 09:59:12 +00:00
Zeev Suraski
65e6d82771 Fix #2096 1999-08-17 22:00:02 +00:00
Andrey Hristov
a0bf6b0923 Removed internal pointer reset from array_walk. 1999-08-16 14:19:49 +00:00
Andrey Hristov
c85209985a Forgot to have internal pointer reset. 1999-08-14 16:43:38 +00:00
Zeev Suraski
2560bfd5f9 Rename TestClass to OverloadedTestClass 1999-08-14 11:08:26 +00:00
Andrey Hristov
fd87bb3321 Modified array_walk() function so that the userland callback is passed
a key and possible user data in addition to the value.  It's still backward
compatible with one argument version.
1999-08-07 16:43:25 +00:00
Zeev Suraski
125300b563 Fix&improve conversion scripts 1999-08-07 15:31:57 +00:00
Zeev Suraski
edabed5604 count/sizeof had their arguments setup wrong (messup between Beta 1 and 2) 1999-08-06 15:34:51 +00:00
Zeev Suraski
37d7d08482 - Improved register_shutdown_function() - you may now supply arguments that
will be passed to the shutdown function
- Improved call_user_func() and call_user_method() - they now support passing
  arguments by reference
- Fixed usort() and uksort()
1999-08-06 15:25:11 +00:00
Thies C. Arntzen
4b8a100ec9 fix for #1947 1999-08-06 08:56:15 +00:00
Zeev Suraski
3cb1eb0471 Removed '3' from key functions in PHP (maintained compatibility through
php3_compat.h)
1999-08-02 19:17:14 +00:00
Andi Gutmans
91ec4763fd Support resource type in gettype() 1999-08-01 17:56:09 +00:00
Andi Gutmans
e3246872e3 -Tiny fix 1999-07-29 04:03:03 +00:00
Andi Gutmans
7d0715d53d - Added function documentation prototypes. Thanks to Egon Schmid for
straightening me out :)
1999-07-29 03:48:29 +00:00
Andi Gutmans
a7af382874 - Added get_class($obj), get_parent_class($obj) and method_exists($obj,"name") 1999-07-28 17:58:38 +00:00
Andrey Hristov
5aa3eff94f Fix link functions problem. 1999-07-28 13:59:35 +00:00
Andi Gutmans
71ffa09f41 - strttotime is compiled in on win32 again. 1999-07-27 17:30:45 +00:00
Andrey Hristov
15d87d2452 check for nKeyLength not arKey 1999-07-27 16:26:30 +00:00
Andrey Hristov
cd0dd562f0 Fix for bug #1887. 1999-07-27 16:17:58 +00:00
Andrey Hristov
ad671669ce Fix for bug #1891 1999-07-27 13:40:54 +00:00
Andrey Hristov
1b2c932cc2 More symbol work.
I've defined a few macros to help with module/request init/startup function definitions.
Basically:

PHP_MINIT_FUNCTION(module)
PHP_MSHUTDOWN_FUNCTION(module)
PHP_RINIT_FUNCTION(module)
PHP_RSHUTDOWN_FUNCTION(module)
PHP_MINFO_FUNCTION(module)

These will expand to proper function prototypes.

Now to specify these in the module entry, use:

PHP_MINIT(module)
PHP_MSHUTDOWN(module)
PHP_RINIT(module)
PHP_RSHUTDOWN(module)
PHP_MINFO(module)

I've updated all modules in ext/standard and everything from ext/apache to ext/db.
If you can, please update your module to use these macros.
1999-07-26 20:09:08 +00:00
Andi Gutmans
8f51f72dc6 - Fix the new operator incompatibility.
- I commented PHP_FUNCTION(strtotime) in datetime.c because it stopped
  win32 from compiling. This needs to be fixed!!!
- Check out libzend to compile the tree now.
1999-07-26 16:57:06 +00:00
Andrey Hristov
736f4831a5 A bunch of grunt work updating function entries and declarations. 1999-07-24 22:16:54 +00:00
Andrey Hristov
974f278257 Added function entry for similar_text(). 1999-07-23 22:47:24 +00:00
Andrey Hristov
244cc30c14 Added function entry for strip_tags. 1999-07-23 22:35:14 +00:00
Andrey Hristov
9dd45ec800 Ported strtotime() function. 1999-07-23 19:51:27 +00:00
Andrey Hristov
64dae03eea -Ported all remaining date() options
-Made array_walk() work somewhat, but it's not
 possible to change array values from inside the
 walk function yet
1999-07-22 15:15:41 +00:00
Andrey Hristov
2d1b6f0801 Added headers_sent() function 1999-07-20 18:03:27 +00:00
Andrey Hristov
4518351648 Proto change 1999-07-17 19:23:32 +00:00
Zeev Suraski
614b4b781e I was sure I committed these already. Weird 1999-07-17 19:17:42 +00:00
Andrey Hristov
459ed2b1ad A little change in how array_splice/array_slice handle length parameter.
Makes it compatible with Perl.
1999-07-16 20:47:20 +00:00
Andrey Hristov
7201cdac96 Updated the functionality of array_splice. 1999-07-16 20:08:06 +00:00
Zeev Suraski
c5724cbd14 License update 1999-07-16 13:13:16 +00:00
Andi Gutmans
3e6bce59b3 - Add a bitwise flag to phpinfo()
- Import a draft of the new PHP license
1999-07-14 16:02:10 +00:00
Zeev Suraski
c43c235427 Don't touch refcount and EA directly 1999-07-09 20:45:55 +00:00
Zeev Suraski
5f62c347c7 Step 2:
Rename is_ref to EA
1999-07-09 17:44:41 +00:00
Zeev Suraski
3a9cb0220c Step 1 in nuking the garbage collector:
- Change the hash destructor to return int
1999-07-09 17:36:12 +00:00
Thies C. Arntzen
ad0076ee53 ported IPTC fro php3 1999-07-05 07:42:07 +00:00
Andrey Hristov
26a7fe78f2 oops 1999-06-28 13:46:58 +00:00
Andrey Hristov
db400222ff *** empty log message *** 1999-06-28 13:39:52 +00:00
Thies C. Arntzen
18962f1993 gettype now reports "boolean" correct 1999-06-22 21:37:43 +00:00
Stig Bakken
117a2fba07 * fixed some #if/#ifdef issues
* hand-patched in php3 changes from 3.0.6 to HEAD in these files:
   fopen-wrappers.[ch] ext/standard/file.[ch] ext/standard/fsock.[ch]
   ext/standard/php3_string.h ext/standard/string.c
* added some new file/socket macros for more readable code:
   FP_FGETS(buf,len,sock,fp,issock)
   FP_FREAD(buf,len,sock,fp,issock)
   FP_FEOF(sock,fp,issock)
   FP_FGETC(sock,fp,issock)
1999-06-16 17:06:53 +00:00
Zeev Suraski
1798a0183a * Fix a buglet in the session module
* Make some renames in the session module - avoid having a function called 'delete'
  so that we don't piss any C++ compilers.  Also rename the {startup,shutdown}_globals
  to {startup,shutdown}_session_globals, so that they're a bit less general names,
  and made them static.
* Remove uselss variables
1999-06-11 09:23:00 +00:00
Andrey Hristov
3b1843bc9f Added preg_grep() function. 1999-06-10 14:41:38 +00:00
Andrey Hristov
f7072fbf87 Make array_shift/array_pop work better. 1999-06-09 22:03:15 +00:00
Andrey Hristov
3d45dd58b8 Fixed a bug in preg_split.
Fixed a bug in array_shift/array_pop.
1999-06-09 21:13:05 +00:00
Andrey Hristov
835b0d8823 *** empty log message *** 1999-06-09 15:39:56 +00:00
Andrey Hristov
bc1e4a5a10 Don't set is_ref in _phpi_splice()
More checking in array_merge()
Added keys() and values() array functions.
1999-06-07 18:52:20 +00:00
Andi Gutmans
d5dc2cd22c - Remove the is_ref =1 from the push() function. 1999-06-06 15:00:49 +00:00
Andrey Hristov
f8f8defb42 Added array_merge() function. 1999-06-05 21:19:25 +00:00
Andrey Hristov
421414df03 Added push(), pop(), shift(), unshift(), splice(), and slice() array functions.
The first 5 work like their Perl counterparts. slice() returns a chunk of the array
specified by offset and length arguments.

Backport to PHP3 and docs will be coming soon.
1999-06-05 20:43:36 +00:00
Zeev Suraski
7a167cd0c1 * Use new Zend macros for standardized definition of classes.
* Reverse bogus shutdown order.
* Use the new object/class support of Zend to make the dir functions work again.
1999-05-28 11:09:39 +00:00
Andrey Hristov
6155d91e7a Just a little sanity check. 1999-05-25 21:47:58 +00:00
Sascha Schumann
39691bed9e conv_proto *.[ch] 1999-05-16 11:19:26 +00:00
Zeev Suraski
1fb61df8a5 * Include all of the standard modules in internal_functions.c.in. Stig - is that
the way you intended it to be?  How does the basic_functions module get in there?
* Fix to get MySQL objects working, even though I'll probably make a dedicated
  MySQL object in the future.
1999-05-14 18:25:16 +00:00
Andrey Hristov
89a56a139b It's been there long enough. 1999-05-12 17:29:51 +00:00
Andrey Hristov
702829709c Added compact() function. 1999-05-11 19:31:37 +00:00
Andrey Hristov
957616cd2d Minor updates. 1999-05-10 21:14:43 +00:00
Andrey Hristov
d7ed9c1455 Added in_array() function. 1999-05-10 21:10:48 +00:00
Andi Gutmans
4079f914bd * Make read_post() read input by chunks instead of returning a single string.
This will allow us to efficiently support file upload through SAPI in the future.
* Fixes
1999-05-09 18:40:59 +00:00
Zeev Suraski
5ba4b3311d Several minor fixes 1999-05-09 13:55:15 +00:00
Andrey Hristov
a0b94fccbb -Added extract() function
-Added function_exists() function
1999-05-08 21:18:06 +00:00
Zeev Suraski
6f1c611868 Fixes 1999-05-05 21:29:26 +00:00
Zeev Suraski
66476011dd A step towards generalizing the INI mechanism even more 1999-04-28 20:26:33 +00:00
Zeev Suraski
1aaf98e54b get rid of some stupid warnings 1999-04-28 20:18:25 +00:00
Zeev Suraski
9b56453566 * Small startup fix
* Fix min() and max()
1999-04-26 20:20:12 +00:00
Zeev Suraski
3cd0af11ee * Get the Apache module to compile again
* Get rid of php3_rqst, use SG(server_context) instead (there's still Apache-specific code,
  but it nuked a global)
1999-04-26 17:26:37 +00:00
Zeev Suraski
7942eaf381 * Plenty of thread safety and Win32 work.
* Changed PHP4 to compile as a DLL, both ISAPI and the the CGI run with the same DLL.
* Switched to using the DLL runtime library under Win32.  PHP will NOT work if
  compiled against the static library!
* Removed yesterday's php4libts project (with php4dllts, it's obsolete).

This *does* affect thread-unsafe Windows as well - the thread unsafe CGI is also
dependant on the thread-unsafe DLL.
1999-04-26 14:00:49 +00:00
Zeev Suraski
0818d96c97 A lot of cleanups... Removed old thread-safe code and other redundant code and files 1999-04-24 00:12:00 +00:00
Zeev Suraski
6f7c0edee3 Remove tls.[ch] 1999-04-23 20:06:01 +00:00
Stig Bakken
2c0ad3ee25 last bunch of extensions moving to ext/
fhttpd module taken out of functions, functions is ready to go.
The only extensions I have tested are gd+freetype and odbc(solid).
Please try compiling in your favourite extensions and let me know how it
works.
1999-04-22 02:48:28 +00:00