Commit graph

1651 commits

Author SHA1 Message Date
David Carlier
c14fa48526
Merge branch 'PHP-8.3' 2024-07-06 20:44:47 +01:00
David Carlier
0b28914a26
Merge branch 'PHP-8.2' into PHP-8.3 2024-07-06 20:44:20 +01:00
David Carlier
237518763f
Fix GH-14774 time_sleep_until overflow. 2024-07-06 20:43:59 +01:00
Peter Kokot
cf3b9fca8f
Sync #if/ifdef/defined (-Wundef) (#14623)
These are either define (to value 1) or undefined:
- __GNUC__
- DBA_CDB_BUILTIN
- DBA_GDBM
- HAVE_FORK
- HAVE_PUTENV
- HAVE_SETENV
- HAVE_SYS_SELECT_H
- HAVE_SYS_SOCKET_H
- HAVE_SYS_WAIT_H
- HAVE_UNSETENV
- RFC3678_API
- ZEND_ENABLE_ZVAL_LONG64
- ZTS

Follow-up of GH-5526
2024-06-24 19:37:07 +02:00
Gina Peter Banyard
47a199c8b4
Add http_(get|clear)_last_reponse_headers() functions (#12500)
This is to provide an alternative to the $http_response_header magic variable

RFC: https://wiki.php.net/rfc/http-last-response-headers
2024-02-29 16:41:09 +00:00
Jorg Sowa
9c4beac8d3 Remove inet_aton
This removes the deprecated inet_aton and its Windows implementation.
The inet_aton can be replaced with platform agnostic inet_pton.

Closes GH-13479
2024-02-23 23:16:43 +01:00
Jorg Adam Sowa
e630aacf79
Remove HAVE_INET_PTON (#13410) 2024-02-21 00:43:56 +00:00
Jorg Adam Sowa
e7b1f2a95b
Change long2ip return type (#13395) 2024-02-16 17:11:18 +01:00
Ilija Tovilo
631bc81607
Implement stackless internal function calls
Co-authored-by: Dmitry Stogov <dmitry@zend.com>

Closes GH-12461
2024-02-06 17:42:28 +01:00
Jakub Zelenka
da6a4e799a
Merge branch 'PHP-8.3' 2024-02-04 12:01:09 +00:00
Jakub Zelenka
ae44ab47a7
Merge branch 'PHP-8.2' into PHP-8.3 2024-02-04 12:00:36 +00:00
Jakub Zelenka
bc30ae4f04
Fix bug #75712: getenv in php-fpm should not read $_ENV, $_SERVER
Closes GH-13195
2024-02-04 11:58:18 +00:00
Niels Dossche
f283f50f1a Merge branch 'PHP-8.3'
* PHP-8.3:
  Add missing NULL checks for spl autoload table
  Add missing NULL pointer checks related to the previous call frame
2023-12-01 09:11:32 +01:00
Niels Dossche
0e69329bb0 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add missing NULL checks for spl autoload table
  Add missing NULL pointer checks related to the previous call frame
2023-12-01 09:09:58 +01:00
Niels Dossche
bedf1083f3 Add missing NULL pointer checks related to the previous call frame 2023-12-01 09:08:47 +01:00
David CARLIER
931a8b0739
inet_ntop requirement check at configure time instead (#12700) 2023-11-17 16:01:46 +00:00
Jakub Zelenka
ee56038d38
Merge branch 'PHP-8.3' 2023-11-16 14:37:41 +00:00
Jakub Zelenka
945c512a4e
Merge branch 'PHP-8.2' into PHP-8.3 2023-11-16 14:37:10 +00:00
Jakub Zelenka
bf250e9f88
Merge branch 'PHP-8.1' into PHP-8.2 2023-11-16 14:36:16 +00:00
Jakub Zelenka
b4208c8f96
Initialize syslog device in GINIT
Closes GH-12663
2023-11-16 14:31:44 +00:00
Jakub Zelenka
5492f0ae8f
Merge branch 'PHP-8.3' 2023-11-09 13:39:52 +00:00
Jakub Zelenka
42ea0ca3db
Merge branch 'PHP-8.2' into PHP-8.3 2023-11-09 13:38:55 +00:00
Jakub Zelenka
c6eeb83e1f
Merge branch 'PHP-8.1' into PHP-8.2 2023-11-09 13:32:33 +00:00
Daniil Gentili
10b2b4a52c
Fix memory leak in standard syslog device handling
The BG(syslog_device) is leaked in RINIT.

Closes GH-12501
2023-11-09 13:29:09 +00:00
David Carlier
44f9c226aa following-up on GH-12551: removing inet_ntoa usage
Close GH-12554
2023-11-06 12:05:56 +00:00
Arnaud Le Blanc
d0731934b7
Expose time spent collecting cycles in gc_status() (#11523) 2023-07-16 12:34:28 +02:00
Ilija Tovilo
9d5f2f1343
Use new ZSTR_INIT_LITERAL macro (#10879) 2023-03-20 16:19:05 +01:00
Christoph M. Becker
c8955c078a
Revert GH-10220
Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit ecc880f491.
This reverts commit 588a07f737.
This reverts commit f377e15751.
This reverts commit b4ba16fe18.
This reverts commit 694ec1deea.
This reverts commit 6b34de8eba.
This reverts commit aa1cd02a43.
This reverts commit 308fd311ea.
This reverts commit 16203b53e1.
This reverts commit 738fb5ca54.
This reverts commit 9fdbefacd3.
This reverts commit cd4a7c1d90.
This reverts commit 928685eba2.
This reverts commit 01e5ffc85c.
2023-01-16 12:27:33 +01:00
Max Kellermann
308fd311ea ext/{standard,json,random,...}: add missing includes 2023-01-10 14:19:03 +00:00
David CARLIER
faef55d638
standard/basic_functions.c remove x bit on this file (#10069) 2022-12-09 08:38:52 +00:00
Christoph M. Becker
75f372295e
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-9905: constant() behaves inconsistent when class is undefined
2022-11-09 15:23:51 +01:00
Christoph M. Becker
4b1feda574
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-9905: constant() behaves inconsistent when class is undefined
2022-11-09 15:23:21 +01:00
Christoph M. Becker
b2186ca7c4
Fix GH-9905: constant() behaves inconsistent when class is undefined
Directly referring to a constant of an undefined throws an exception;
there is not much point in `constant()` raising a fatal error in this
case.

Closes GH-9907.
2022-11-09 15:21:50 +01:00
George Peter Banyard
66661ae682
Remove most usages of zend_fcall_info_args()
This reallocates the PHP array when one can just use the named_params fields to pass the positional arguments instead.

Only usage of zend_fcall_info_args(_ex) remains in PDO.
2022-10-21 18:31:40 +01:00
Máté Kocsis
a4fd2609ce
Declare ext/standard constants in stubs - part 9 (#9717) 2022-10-13 13:13:36 +02:00
Máté Kocsis
c59e94fc9d
Declare ext/stanard constants in stubs - part 11 (#9728) 2022-10-12 12:07:03 +02:00
Máté Kocsis
433ed0973a
Declare ext/standard constants in stubs - part 10 (#9719) 2022-10-12 08:16:19 +02:00
Máté Kocsis
ed0f1f04b9
Declare ext/standard constants in stubs - part 8 (#9615) 2022-09-30 13:51:18 +02:00
Nikita Popov
0b2fe40d23 Drop dead ENABLE_TEST_CLASS check 2022-09-21 21:28:21 +02:00
Máté Kocsis
3227d04fa9
Declare ext/standard constants in stubs - part 7 (#9505) 2022-09-08 13:57:07 +02:00
Máté Kocsis
cfa72ff3af
Declare ext/standard constants in stubs - part 6
Closes GH-9467
2022-09-02 16:07:25 +02:00
Máté Kocsis
6f2f228e4a
Declare ext/standard constants in stubs - part 5
Closes GH-9466
2022-09-02 15:04:49 +02:00
Máté Kocsis
64b962b241
Declare ext/standard constants in stubs - part 4
Closes GH-9465
2022-09-02 12:41:51 +02:00
Máté Kocsis
ef72d53397
Declare ext/standard constants in stubs - part 3 (#9427) 2022-08-26 14:47:34 +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
Dennis Snell
492af9f88e
Add ini_parse_quantity function to convert ini quantities shorthand notation to int (#8454) 2022-07-10 14:48:52 +02:00
David Carlier
dfbb425295 Use safe_*erealloc* flavor in few places to mitigate possible overflows. 2022-07-04 14:41:04 +01:00
Arnaud Le Blanc
efc8f0ebf8
Deprecate zend_atol() / add zend_ini_parse_quantity() (#7951)
Add zend_ini_parse_quantity() and deprecate zend_atol(), zend_atoi()

zend_atol() and zend_atoi() don't just do number parsing.
They also check for a 'K', 'M', or 'G' at the end of the string,
and multiply the parsed value out accordingly.

Unfortunately, they ignore any other non-numerics between the
numeric component and the last character in the string.
This means that numbers such as the following are both valid
and non-intuitive in their final output.

* "123KMG" is interpreted as "123G" -> 132070244352
* "123G " is interpreted as "123 " -> 123
* "123GB" is interpreted as "123B" -> 123
* "123 I like tacos." is also interpreted as "123." -> 123

Currently, in php-src these functions are used only for parsing ini values.

In this change we deprecate zend_atol(), zend_atoi(), and introduce a new
function with the same behavior, but with the ability to report invalid inputs
to the caller. The function's name also makes the behavior less unexpected:
zend_ini_parse_quantity().

Co-authored-by: Sara Golemon <pollita@php.net>
2022-06-17 14:12:53 +02:00
Máté Kocsis
debd38f851 Add support for sensitive parameters in stubs 2022-06-04 18:15:05 +02:00
Máté Kocsis
14da1cb909
Add support for class constants in stubs (#7434) 2022-05-22 22:27:23 +02:00