Commit Graph

169 Commits

Author SHA1 Message Date
Máté Kocsis
a4fd2609ce
Declare ext/standard constants in stubs - part 9 (#9717) 2022-10-13 13:13:36 +02:00
Máté Kocsis
3227d04fa9
Declare ext/standard constants in stubs - part 7 (#9505) 2022-09-08 13:57:07 +02:00
Go Kudo
4d8dd8d258
Implement Random Extension
https://wiki.php.net/rfc/rng_extension
https://wiki.php.net/rfc/random_extension_improvement
2022-07-19 10:27:38 +01:00
George Peter Banyard
ef287bfceb
Minor refactoring of std string extension (#8196)
Mainly using more appropriate types, early returns, and moving the happy path to the primary scope (failure path is guarded by ``UNEXPECTED`` macros.
2022-04-23 12:15:13 +01:00
George Peter Banyard
5171cb435a Fix [-Wundef] warnings in standard extension 2022-04-01 15:48:41 +01:00
George Peter Banyard
71a110fcaa
Remove strnatcmp_ex() wrappers
These APIs always returned SUCCESS.

Closes GH-8195
2022-03-23 23:53:12 +00:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Nikita Popov
3e01f5afb1 Replace zend_bool uses with bool
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.
2021-01-15 12:33:06 +01:00
twosee
88355dd338 Constify char * arguments of APIs
Closes GH-5676.
2020-06-08 10:38:45 +02:00
Nikita Popov
2bfcd8825c Remove now unnecessary PHP_FUNCTION() declarations 2020-04-03 15:41:41 +02:00
George Peter Banyard
457380cae7 Drop wchar header check as always defined since C95 2020-03-31 00:14:56 +02:00
Philipp Tanlak
1668ad7cb1 Add str_contains() function
RFC: https://wiki.php.net/rfc/str_contains

Closes GH-5179.
2020-03-16 11:05:26 +01:00
Nikita Popov
bb6e2a1615 Avoid used of "named fn" in ext/standard 2020-02-25 10:21:31 +01:00
Nikita Popov
8dd91f52a5 Remove state pointer argument from php_strip_tags 2020-01-27 16:13:36 +01:00
Máté Kocsis
beee92a887
Remove support for mixing parameter order in implode() 2019-12-12 13:49:05 +01:00
Máté Kocsis
144b41ce88
Remove money_format() function 2019-12-05 13:15:54 +01:00
Máté Kocsis
b63c625260
Remove hebrevc() function 2019-12-05 13:15:54 +01:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Peter Kokot
638c21765c Remove HAVE_STRCOLL check
The strcoll function is defined in the C89 standard and should be
on today's systems always available via the <string.h> header.

https://port70.net/~nsz/c/c89/c89-draft.html#4.11.4.3

- Remove also SKIPIF strcoll check in test
2019-06-28 00:05:55 +02:00
Peter Kokot
e6a6017f78 Remove HAVE_STRERROR
Checking for the strerror function presence is no longer needed since it
is part of the C89 standard [1] and can be safely assumed that all
current systems have it.

Check in the configure.ac and Windows defined symbol are still left
until the file library (libmagic) will be updated.

[1]: https://port70.net/~nsz/c/c89/c89-draft.html
2019-04-08 23:39:45 +02:00
Peter Kokot
e06836a1a3 Remove checks for locale.h, setlocale, localeconv
The `<loccale.h>` header file, setlocale, and localeconv are part of the
standard C89 [1] and on current systems can be used unconditionally.

Since PHP 7.4 requires at least C89 or greater, the `HAVE_LOCALE_H`,
`HAVE_SETLOCALE`, and `HAVE_LOCALECONV` symbols defined by Autoconf in
configure.ac [2] can be ommitted and simplifed.

The bundled libmagic (file) has also been patched already in version
5.35 and up in upstream location so when it will be patched also in
php-src the check for locale.h header is still left in the configure.ac
and in windows headers definition file.

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.4
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

Omit the bundled libmagic files
2019-04-07 18:32:54 +02:00
Nikita Popov
96daef0458 Make ABI of SIMD optimized functions independent of compiler flags
Always export these as normal functions and only use function pointers
internally if necessary.
2019-02-14 11:49:21 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
dd932f7e63 Changed php_add[c]slashes prototypes (removed should_free argument) 2018-06-29 00:19:16 +03:00
Peter Kokot
32489322a1 Remove outdated comments about PHP 3 2018-06-27 11:53:40 +02:00
Anatol Belski
fa9ea3c9eb Use const pointers where appropriate 2018-03-16 20:37:51 +01:00
Bob Weinand
c1882ef004 Fixed build (extern php_stripslashes) 2018-02-28 01:47:40 +01:00
Xinchen Hui
91635b011b Optimized php_stripslash with SSSE3 instr 2018-02-21 10:09:11 +08:00
Anatol Belski
a6e86f7a3f Implement intrinsic function resolving per MINIT 2018-01-24 09:33:32 +01:00
Gabriel Caruso
2238403892 Trailing whitespaces on ext/*
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-04 02:38:32 -02:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Dmitry Stogov
83e495e0fd Move constants into read-only data segment 2017-12-14 22:14:36 +03:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Andrea Faulds
1a512eed44 Move utf8_encode and utf8_decode to ext/standard 2016-10-17 15:39:02 +01:00
Anatol Belski
0ca15cbeba reduce size of stream struct
32 bytes are spared on 64-bit build
2016-10-05 22:53:21 +02:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Nikita Popov
208257eec5 Explicitly ignore mblen(NULL, 0) retval 2015-07-16 22:39:11 +02:00
Dmitry Stogov
d2d326a381 Cleanup (avoid reallocatios and side effects in php_strip_tags) 2015-07-01 19:04:18 +03:00
Anatol Belski
0f766a28cb fix mbrlen prototype availability 2015-05-18 22:37:19 +02:00
Xinchen Hui
c369a03407 Use zend_string in case we will optimize them 2015-01-20 10:59:28 +08:00
Xinchen Hui
020610ee40 Remove addslashes_str 2015-01-20 10:11:48 +08:00
Xinchen Hui
da7d8f45b2 Optimized php_addslashes 2015-01-19 10:46:39 -05:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Dmitry Stogov
ade7a41040 Optimized str_[i]replace to aviod reallocations and repeatable conversions to lowercase 2015-01-13 23:23:50 +03:00
Xinchen Hui
94d26ad4b9 Add php_string_tolower/toupper which is locale depened 2014-12-25 11:29:11 +08:00
Dmitry Stogov
6ec5ab77df Improved trim/ltrim/rtrim functions.
Now php_trim() operates on zend_string and returns zend_string (it may return the same zend_string).
2014-12-23 04:29:41 +03:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00