Skip to content

Commit 543bcd8

Browse files
committed
Merge branch 'PHP-8.0'
2 parents b961b7f + 76e4bf3 commit 543bcd8

File tree

4 files changed

+22
-23
lines changed

4 files changed

+22
-23
lines changed

ext/standard/basic_functions.stub.php

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ function time_sleep_until(float $timestamp): bool {}
285285

286286
function get_current_user(): string {}
287287

288-
function get_cfg_var(string $name): string|array|false {}
288+
function get_cfg_var(string $option): string|array|false {}
289289

290290
function error_log(string $message, int $message_type = 0, ?string $destination = null, ?string $additional_headers = null): bool {}
291291

@@ -312,16 +312,16 @@ function php_strip_whitespace(string $filename): string {}
312312

313313
function highlight_string(string $string, bool $return = false): string|bool {}
314314

315-
function ini_get(string $name): string|false {}
315+
function ini_get(string $option): string|false {}
316316

317317
function ini_get_all(?string $extension = null, bool $details = true): array|false {}
318318

319-
function ini_set(string $name, string $value): string|false {}
319+
function ini_set(string $option, string $value): string|false {}
320320

321321
/** @alias ini_set */
322-
function ini_alter(string $name, string $value): string|false {}
322+
function ini_alter(string $option, string $value): string|false {}
323323

324-
function ini_restore(string $name): void {}
324+
function ini_restore(string $option): void {}
325325

326326
function set_include_path(string $include_path): string|false {}
327327

@@ -722,7 +722,7 @@ function rewinddir($dir_handle = null): void {}
722722
function readdir($dir_handle = null): string|false {}
723723

724724
/** @param resource|null $context */
725-
function scandir(string $directory, int $sorting_order = 0, $context = null): array|false {}
725+
function scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, $context = null): array|false {}
726726

727727
#ifdef HAVE_GLOB
728728
function glob(string $pattern, int $flags = 0): array|false {}
@@ -1110,7 +1110,7 @@ function dechex(int $num): string {}
11101110

11111111
function base_convert(string $num, int $from_base, int $to_base): string {}
11121112

1113-
function number_format(float $num, int $decimals = 0, ?string $decimal_separator = "." , ?string $thousands_separator = ","): string {}
1113+
function number_format(float $num, int $decimals = 0, ?string $decimal_separator = ".", ?string $thousands_separator = ","): string {}
11141114

11151115
function fmod(float $num1, float $num2): float {}
11161116

@@ -1125,7 +1125,7 @@ function gettimeofday(bool $as_float = false): array|float {}
11251125
#endif
11261126

11271127
#ifdef HAVE_GETRUSAGE
1128-
function getrusage(bool $mode = 0): array|false {}
1128+
function getrusage(int $mode = 0): array|false {}
11291129
#endif
11301130

11311131
/* pack.c */
@@ -1277,7 +1277,7 @@ function stream_socket_sendto($socket, string $data, int $flags = 0, string $add
12771277
* @param resource $stream
12781278
* @param resource|null $session_stream
12791279
*/
1280-
function stream_socket_enable_crypto($stream, bool $enable, ?int $crypto_type = null, $session_stream = null): int|bool {}
1280+
function stream_socket_enable_crypto($stream, bool $enable, ?int $crypto_method = null, $session_stream = null): int|bool {}
12811281

12821282
#ifdef HAVE_SHUTDOWN
12831283
/** @param resource $stream */
@@ -1439,8 +1439,7 @@ function rawurlencode(string $string): string {}
14391439
function rawurldecode(string $string): string {}
14401440

14411441
/** @param resource $context */
1442-
// TODO: Make bool argument?
1443-
function get_headers(string $url, int $as_assoc_array = 0, $context = null): array|false {}
1442+
function get_headers(string $url, bool $associative = false, $context = null): array|false {}
14441443

14451444
/* user_filters.c */
14461445

ext/standard/basic_functions_arginfo.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 146996b3110f85a6a2d074fb910f0d7aae573358 */
2+
* Stub hash: e38af54610d415ef27b19137645d8f6481953624 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0)
55
ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0)
@@ -426,7 +426,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_current_user, 0, 0, IS_STRIN
426426
ZEND_END_ARG_INFO()
427427

428428
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_cfg_var, 0, 1, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE)
429-
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
429+
ZEND_ARG_TYPE_INFO(0, option, IS_STRING, 0)
430430
ZEND_END_ARG_INFO()
431431

432432
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_error_log, 0, 1, _IS_BOOL, 0)
@@ -477,7 +477,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_highlight_string, 0, 1, MAY_BE_S
477477
ZEND_END_ARG_INFO()
478478

479479
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_get, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
480-
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
480+
ZEND_ARG_TYPE_INFO(0, option, IS_STRING, 0)
481481
ZEND_END_ARG_INFO()
482482

483483
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_get_all, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
@@ -486,14 +486,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_get_all, 0, 0, MAY_BE_ARRAY|
486486
ZEND_END_ARG_INFO()
487487

488488
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_set, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
489-
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
489+
ZEND_ARG_TYPE_INFO(0, option, IS_STRING, 0)
490490
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
491491
ZEND_END_ARG_INFO()
492492

493493
#define arginfo_ini_alter arginfo_ini_set
494494

495495
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ini_restore, 0, 1, IS_VOID, 0)
496-
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
496+
ZEND_ARG_TYPE_INFO(0, option, IS_STRING, 0)
497497
ZEND_END_ARG_INFO()
498498

499499
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_set_include_path, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
@@ -1125,7 +1125,7 @@ ZEND_END_ARG_INFO()
11251125

11261126
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_scandir, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
11271127
ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
1128-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sorting_order, IS_LONG, 0, "0")
1128+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sorting_order, IS_LONG, 0, "SCANDIR_SORT_ASCENDING")
11291129
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null")
11301130
ZEND_END_ARG_INFO()
11311131

@@ -1734,7 +1734,7 @@ ZEND_END_ARG_INFO()
17341734

17351735
#if defined(HAVE_GETRUSAGE)
17361736
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getrusage, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
1737-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, _IS_BOOL, 0, "0")
1737+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0")
17381738
ZEND_END_ARG_INFO()
17391739
#endif
17401740

@@ -1931,7 +1931,7 @@ ZEND_END_ARG_INFO()
19311931
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_socket_enable_crypto, 0, 2, MAY_BE_LONG|MAY_BE_BOOL)
19321932
ZEND_ARG_INFO(0, stream)
19331933
ZEND_ARG_TYPE_INFO(0, enable, _IS_BOOL, 0)
1934-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, crypto_type, IS_LONG, 1, "null")
1934+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, crypto_method, IS_LONG, 1, "null")
19351935
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, session_stream, "null")
19361936
ZEND_END_ARG_INFO()
19371937

@@ -2110,7 +2110,7 @@ ZEND_END_ARG_INFO()
21102110

21112111
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
21122112
ZEND_ARG_TYPE_INFO(0, url, IS_STRING, 0)
2113-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, as_assoc_array, IS_LONG, 0, "0")
2113+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, associative, _IS_BOOL, 0, "false")
21142114
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null")
21152115
ZEND_END_ARG_INFO()
21162116

ext/standard/dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ PHP_FUNCTION(scandir)
530530
{
531531
char *dirn;
532532
size_t dirn_len;
533-
zend_long flags = 0;
533+
zend_long flags = PHP_SCANDIR_SORT_ASCENDING;
534534
zend_string **namelist;
535535
int n, i;
536536
zval *zcontext = NULL;

ext/standard/url.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,14 +671,14 @@ PHP_FUNCTION(get_headers)
671671
size_t url_len;
672672
php_stream *stream;
673673
zval *prev_val, *hdr = NULL;
674-
zend_long format = 0;
674+
zend_bool format = 0;
675675
zval *zcontext = NULL;
676676
php_stream_context *context;
677677

678678
ZEND_PARSE_PARAMETERS_START(1, 3)
679679
Z_PARAM_PATH(url, url_len)
680680
Z_PARAM_OPTIONAL
681-
Z_PARAM_LONG(format)
681+
Z_PARAM_BOOL(format)
682682
Z_PARAM_RESOURCE_OR_NULL(zcontext)
683683
ZEND_PARSE_PARAMETERS_END();
684684

0 commit comments

Comments
 (0)